Clean-up the OpenGL renderers a little
This commit is contained in:
parent
1140ab0916
commit
2af6a043ef
1 changed files with 24 additions and 26 deletions
|
@ -432,35 +432,33 @@ static void GlyphBatch_Draw(spritebatch_sprite_t *sprites, int count, int textur
|
|||
const GLfloat vertex_top = (sprites[i].y * (2.0f / glyph_destination_surface->height)) - 1.0f;
|
||||
const GLfloat vertex_bottom = ((sprites[i].y + glyph->height) * (2.0f / glyph_destination_surface->height)) - 1.0f;
|
||||
|
||||
vertex_buffer_slot->vertices[0][0].texture_coordinate.x = texture_left;
|
||||
vertex_buffer_slot->vertices[0][0].texture_coordinate.y = texture_top;
|
||||
vertex_buffer_slot->vertices[0][1].texture_coordinate.x = texture_right;
|
||||
vertex_buffer_slot->vertices[0][1].texture_coordinate.y = texture_top;
|
||||
vertex_buffer_slot->vertices[0][2].texture_coordinate.x = texture_right;
|
||||
vertex_buffer_slot->vertices[0][2].texture_coordinate.y = texture_bottom;
|
||||
vertex_buffer_slot[i].vertices[0][0].texture_coordinate.x = texture_left;
|
||||
vertex_buffer_slot[i].vertices[0][0].texture_coordinate.y = texture_top;
|
||||
vertex_buffer_slot[i].vertices[0][1].texture_coordinate.x = texture_right;
|
||||
vertex_buffer_slot[i].vertices[0][1].texture_coordinate.y = texture_top;
|
||||
vertex_buffer_slot[i].vertices[0][2].texture_coordinate.x = texture_right;
|
||||
vertex_buffer_slot[i].vertices[0][2].texture_coordinate.y = texture_bottom;
|
||||
|
||||
vertex_buffer_slot->vertices[1][0].texture_coordinate.x = texture_left;
|
||||
vertex_buffer_slot->vertices[1][0].texture_coordinate.y = texture_top;
|
||||
vertex_buffer_slot->vertices[1][1].texture_coordinate.x = texture_right;
|
||||
vertex_buffer_slot->vertices[1][1].texture_coordinate.y = texture_bottom;
|
||||
vertex_buffer_slot->vertices[1][2].texture_coordinate.x = texture_left;
|
||||
vertex_buffer_slot->vertices[1][2].texture_coordinate.y = texture_bottom;
|
||||
vertex_buffer_slot[i].vertices[1][0].texture_coordinate.x = texture_left;
|
||||
vertex_buffer_slot[i].vertices[1][0].texture_coordinate.y = texture_top;
|
||||
vertex_buffer_slot[i].vertices[1][1].texture_coordinate.x = texture_right;
|
||||
vertex_buffer_slot[i].vertices[1][1].texture_coordinate.y = texture_bottom;
|
||||
vertex_buffer_slot[i].vertices[1][2].texture_coordinate.x = texture_left;
|
||||
vertex_buffer_slot[i].vertices[1][2].texture_coordinate.y = texture_bottom;
|
||||
|
||||
vertex_buffer_slot->vertices[0][0].vertex_coordinate.x = vertex_left;
|
||||
vertex_buffer_slot->vertices[0][0].vertex_coordinate.y = vertex_top;
|
||||
vertex_buffer_slot->vertices[0][1].vertex_coordinate.x = vertex_right;
|
||||
vertex_buffer_slot->vertices[0][1].vertex_coordinate.y = vertex_top;
|
||||
vertex_buffer_slot->vertices[0][2].vertex_coordinate.x = vertex_right;
|
||||
vertex_buffer_slot->vertices[0][2].vertex_coordinate.y = vertex_bottom;
|
||||
vertex_buffer_slot[i].vertices[0][0].vertex_coordinate.x = vertex_left;
|
||||
vertex_buffer_slot[i].vertices[0][0].vertex_coordinate.y = vertex_top;
|
||||
vertex_buffer_slot[i].vertices[0][1].vertex_coordinate.x = vertex_right;
|
||||
vertex_buffer_slot[i].vertices[0][1].vertex_coordinate.y = vertex_top;
|
||||
vertex_buffer_slot[i].vertices[0][2].vertex_coordinate.x = vertex_right;
|
||||
vertex_buffer_slot[i].vertices[0][2].vertex_coordinate.y = vertex_bottom;
|
||||
|
||||
vertex_buffer_slot->vertices[1][0].vertex_coordinate.x = vertex_left;
|
||||
vertex_buffer_slot->vertices[1][0].vertex_coordinate.y = vertex_top;
|
||||
vertex_buffer_slot->vertices[1][1].vertex_coordinate.x = vertex_right;
|
||||
vertex_buffer_slot->vertices[1][1].vertex_coordinate.y = vertex_bottom;
|
||||
vertex_buffer_slot->vertices[1][2].vertex_coordinate.x = vertex_left;
|
||||
vertex_buffer_slot->vertices[1][2].vertex_coordinate.y = vertex_bottom;
|
||||
|
||||
++vertex_buffer_slot;
|
||||
vertex_buffer_slot[i].vertices[1][0].vertex_coordinate.x = vertex_left;
|
||||
vertex_buffer_slot[i].vertices[1][0].vertex_coordinate.y = vertex_top;
|
||||
vertex_buffer_slot[i].vertices[1][1].vertex_coordinate.x = vertex_right;
|
||||
vertex_buffer_slot[i].vertices[1][1].vertex_coordinate.y = vertex_bottom;
|
||||
vertex_buffer_slot[i].vertices[1][2].vertex_coordinate.x = vertex_left;
|
||||
vertex_buffer_slot[i].vertices[1][2].vertex_coordinate.y = vertex_bottom;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue