Clean-up the OpenGL renderers a little

This commit is contained in:
Clownacy 2020-02-04 16:35:42 +00:00
parent 1140ab0916
commit 2af6a043ef

View file

@ -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;
}
}