ref: bd731321f2f5b9c5654f59401ecd55b8a4206a17
parent: eab2a80ae522d22b763846b0674c401647db9602
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Jul 31 00:54:22 EDT 2019
Use triangle fans instead of quads Quads are Legacy OpenGL
--- a/src/Backends/Rendering/OpenGL2.cpp
+++ b/src/Backends/Rendering/OpenGL2.cpp
@@ -259,7 +259,7 @@
vertex_buffer[3][0] = -1.0f;
vertex_buffer[3][1] = 1.0f;
- glDrawArrays(GL_QUADS, 0, 4);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
SDL_GL_SwapWindow(window);
@@ -357,7 +357,7 @@
vertex_buffer[3][0] = vertex_left;
vertex_buffer[3][1] = vertex_bottom;
- glDrawArrays(GL_QUADS, 0, 4);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
void Backend_Blit(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y, BOOL colour_key)
@@ -400,7 +400,7 @@
vertex_buffer[3][0] = (GLfloat)rect->left;
vertex_buffer[3][1] = (GLfloat)rect->bottom;
- glDrawArrays(GL_QUADS, 0, 4);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
void Backend_ColourFill(Backend_Surface *surface, const RECT *rect, unsigned char red, unsigned char green, unsigned char blue)
@@ -544,7 +544,7 @@
vertex_buffer[3][0] = vertex_left;
vertex_buffer[3][1] = vertex_bottom;
- glDrawArrays(GL_QUADS, 0, 4);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
void Backend_DrawGlyph(Backend_Surface *surface, Backend_Glyph *glyph, long x, long y, const unsigned char *colours)