ref: 2af6a043ef01159acade1e2812f1dba723d6eb59
parent: 1140ab0916ddedef02967575d50afb86646dd091
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Feb 4 11:35:42 EST 2020
Clean-up the OpenGL renderers a little
--- a/src/Backends/Rendering/OpenGL3.cpp
+++ b/src/Backends/Rendering/OpenGL3.cpp
@@ -432,35 +432,33 @@
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;
}
}
--
⑨