diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-05-21 20:57:09 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-05-21 20:57:09 -0600 |
commit | b4f8d4455bd73f025948498157f2076738819f43 (patch) | |
tree | bef0045e591f7639b34a1be16fee3d65a306c791 /progs | |
parent | a10ba38df7ac80e36db15aaae9f78e7223b2bfae (diff) | |
download | external_mesa3d-b4f8d4455bd73f025948498157f2076738819f43.zip external_mesa3d-b4f8d4455bd73f025948498157f2076738819f43.tar.gz external_mesa3d-b4f8d4455bd73f025948498157f2076738819f43.tar.bz2 |
set texcoords depending on GLX_Y_INVERTED_EXT
Diffstat (limited to 'progs')
-rw-r--r-- | progs/xdemos/texture_from_pixmap.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/progs/xdemos/texture_from_pixmap.c b/progs/xdemos/texture_from_pixmap.c index 2222956..50870c4 100644 --- a/progs/xdemos/texture_from_pixmap.c +++ b/progs/xdemos/texture_from_pixmap.c @@ -41,6 +41,9 @@ #include <unistd.h> +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(); |