Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2016-06-19 21:29:26 +0300
committerMikkel Krautz <mikkel@krautz.dk>2016-06-19 21:29:26 +0300
commite13d6c94bf9a58330a01c0f85d7ed0d0dd0fb6fd (patch)
tree2394fe4540bfe4ec0340245fee295fdbdeb292aa /overlay_gl
parentf4ca0cf25f12195009c70f31915698d658e60b88 (diff)
overlay_gl: call glDrawArrays with GL_TRIANGLES instead of GL_QUADS.
GL_QUADS is deprecated in modern GL.
Diffstat (limited to 'overlay_gl')
-rw-r--r--overlay_gl/overlay.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/overlay_gl/overlay.c b/overlay_gl/overlay.c
index d203ccf9f..989e5c12a 100644
--- a/overlay_gl/overlay.c
+++ b/overlay_gl/overlay.c
@@ -468,15 +468,29 @@ static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) {
float xmx = right / w;
float ymx = bottom / h;
-
- GLfloat vertex[] = {left, bottom,
- left, top,
- right, top,
- right, bottom};
- GLfloat tex[] = {xm, ymx, xm, ym, xmx, ym, xmx, ymx};
+ GLfloat vertex[] = {
+ left, bottom,
+ left, top,
+ right, top,
+
+ left, bottom,
+ right, top,
+ right, bottom
+ };
glVertexPointer(2, GL_FLOAT, 0, vertex);
+
+ GLfloat tex[] = {
+ xm, ymx,
+ xm, ym,
+ xmx, ym,
+
+ xm, ymx,
+ xmx, ym,
+ xmx, ymx
+ };
glTexCoordPointer(2, GL_FLOAT, 0, tex);
- glDrawArrays(GL_QUADS, 0, 4);
+
+ glDrawArrays(GL_TRIANGLES, 0, 6);
glPopMatrix();
}