diff --git a/src/Backends/Rendering/OpenGL3.cpp b/src/Backends/Rendering/OpenGL3.cpp index a2e9324e..9ec53f3f 100644 --- a/src/Backends/Rendering/OpenGL3.cpp +++ b/src/Backends/Rendering/OpenGL3.cpp @@ -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; } }