From b4f8d4455bd73f025948498157f2076738819f43 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 21 May 2007 20:57:09 -0600 Subject: [PATCH] set texcoords depending on GLX_Y_INVERTED_EXT --- progs/xdemos/texture_from_pixmap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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(); -- 2.30.2