Skip to content
Permalink
Browse files

Use glDrawArrays instead of immediate mode in OS X's drawOverlay().

  • Loading branch information...
mkrautz committed Feb 5, 2015
1 parent f4568b9 commit 1fab580baa2c8b793f62b57d6e6c37323a6f98b8
Showing with 3 additions and 11 deletions.
  1. +3 −11 macx/overlay/overlay.m
@@ -423,17 +423,9 @@ static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) {
right, top,
right, bottom};
GLfloat tex[] = {xm, ymx, xm, ym, xmx, ym, xmx, ymx};

glBegin(GL_QUADS);
glTexCoord2f(tex[0], tex[1]);
glVertex2f(vertex[0], vertex[1]);
glTexCoord2f(tex[2], tex[3]);
glVertex2f(vertex[2], vertex[3]);
glTexCoord2f(tex[4], tex[5]);
glVertex2f(vertex[4], vertex[5]);
glTexCoord2f(tex[6], tex[7]);
glVertex2f(vertex[6], vertex[7]);
glEnd();
glVertexPointer(2, GL_FLOAT, 0, vertex);
glTexCoordPointer(2, GL_FLOAT, 0, tex);
glDrawArrays(GL_QUADS, 0, 4);

glPopMatrix();
}

0 comments on commit 1fab580

Please sign in to comment.
You can’t perform that action at this time.