From: Brian Date: Tue, 22 May 2007 02:57:09 +0000 (-0600) Subject: set texcoords depending on GLX_Y_INVERTED_EXT X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4f8d4455bd73f025948498157f2076738819f43;p=mesa.git set texcoords depending on GLX_Y_INVERTED_EXT --- diff --git a/progs/xdemos/texture_from_pixmap.c b/progs/xdemos/texture_from_pixmap.c index 22229567036..50870c4df4a 100644 --- a/progs/xdemos/texture_from_pixmap.c +++ b/progs/xdemos/texture_from_pixmap.c @@ -41,6 +41,9 @@ #include +static float top, bottom; + + static Display * OpenDisplay(void) { @@ -71,7 +74,6 @@ ChoosePixmapFBConfig(Display *display) int screen = DefaultScreen(display); GLXFBConfig *fbconfigs; int i, nfbconfigs, value; - float top, bottom; fbconfigs = glXGetFBConfigs(display, screen, &nfbconfigs); for (i = 0; i < nfbconfigs; i++) { @@ -273,13 +275,13 @@ Redraw(Display *dpy, Window win, float rot) glRotatef(2.0 * rot, 1, 0, 0); glBegin(GL_QUADS); - glTexCoord2d(0.0, 0.0); + glTexCoord2d(0.0, bottom); glVertex2f(-1, -1); - glTexCoord2d(1.0, 0.0); + glTexCoord2d(1.0, bottom); glVertex2f( 1, -1); - glTexCoord2d(1.0, 1.0); + glTexCoord2d(1.0, top); glVertex2d(1.0, 1.0); - glTexCoord2d(0.0, 1.0); + glTexCoord2d(0.0, top); glVertex2f(-1.0, 1.0); glEnd();