From 9f37be694ed5fc14d783559055443d4042c73393 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 28 Feb 2007 11:58:06 -0700 Subject: s/ARB/MESA/ in extension check (bug 10126) --- progs/demos/winpos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'progs') diff --git a/progs/demos/winpos.c b/progs/demos/winpos.c index 2ee1df69fb..3a1a19ecdb 100644 --- a/progs/demos/winpos.c +++ b/progs/demos/winpos.c @@ -77,7 +77,7 @@ static void init( void ) WindowPosFunc = &glWindowPos2fARB; } else -#elif defined(GL_ARB_window_pos) +#elif defined(GL_MESA_window_pos) if (glutExtensionSupported("GL_MESA_window_pos")) { printf("Using GL_MESA_window_pos\n"); WindowPosFunc = &glWindowPos2fMESA; -- cgit v1.2.3 From 03b9e16507627e3163cfdf3d119af14e5fb1cd65 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Mar 2007 07:39:27 -0700 Subject: include assert.h --- progs/tools/trace/gltrace_support.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'progs') diff --git a/progs/tools/trace/gltrace_support.cc b/progs/tools/trace/gltrace_support.cc index fb0404c450..a557cb32d8 100644 --- a/progs/tools/trace/gltrace_support.cc +++ b/progs/tools/trace/gltrace_support.cc @@ -20,6 +20,7 @@ */ #include "gltrace_support.h" +#include #include #include #include -- cgit v1.2.3 From 887d3c67cbe1f09ec5a816eca859936addb3d3ec Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Mar 2007 07:42:42 -0700 Subject: s/unsigned int/size_t/ (bug 10135) --- progs/tools/trace/gltrace_support.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'progs') diff --git a/progs/tools/trace/gltrace_support.cc b/progs/tools/trace/gltrace_support.cc index a557cb32d8..b188e73f29 100644 --- a/progs/tools/trace/gltrace_support.cc +++ b/progs/tools/trace/gltrace_support.cc @@ -35,7 +35,7 @@ namespace { { static char buf[4096]; int status; - unsigned int length = sizeof(buf)-1; + size_t length = sizeof(buf)-1; memset (buf, 0, sizeof(buf)); -- cgit v1.2.3 From d592eaeb8321d1e408050fe07bff2bf234615b4c Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Mar 2007 07:56:11 -0700 Subject: fix clipping, display name, warnings --- progs/tests/sharedtex.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'progs') diff --git a/progs/tests/sharedtex.c b/progs/tests/sharedtex.c index ebe73f19f4..7be90d67f5 100644 --- a/progs/tests/sharedtex.c +++ b/progs/tests/sharedtex.c @@ -368,7 +368,7 @@ Resize(const struct window *h, unsigned int width, unsigned int height) glFrustum(-1, 1, -1, 1, 2, 10); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - glTranslatef(0, 0, -3.5); + glTranslatef(0, 0, -4.5); } @@ -408,28 +408,30 @@ EventLoop(void) } - +#if 0 static void PrintInfo(const struct window *h) { printf("Name: %s\n", h->DisplayName); - printf(" Display: 0x%x\n", h->Dpy); - printf(" Window: 0x%x\n", h->Win); - printf(" Context: 0x%x\n", h->Context); + printf(" Display: %p\n", (void *) h->Dpy); + printf(" Window: 0x%x\n", (int) h->Win); + printf(" Context: 0x%x\n", (int) h->Context); } +#endif int main(int argc, char *argv[]) { - int i; + const char *dpyName = XDisplayName(NULL); + struct window *h0, *h1, *h2, *h3; /* four windows and contexts sharing display lists and texture objects */ - h0 = AddWindow(":0", 10, 10, NULL); - h1 = AddWindow(":0", 330, 10, h0); - h2 = AddWindow(":0", 10, 350, h0); - h3 = AddWindow(":0", 330, 350, h0); + h0 = AddWindow(dpyName, 10, 10, NULL); + h1 = AddWindow(dpyName, 330, 10, h0); + h2 = AddWindow(dpyName, 10, 350, h0); + h3 = AddWindow(dpyName, 330, 350, h0); InitGLstuff(h0); -- cgit v1.2.3 From 2282d815360c2087dd080c794084bea65e6da358 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Mar 2007 16:33:00 -0700 Subject: destroy window during cleanup --- progs/tests/fbotest1.c | 4 +++- progs/tests/fbotexture.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'progs') diff --git a/progs/tests/fbotest1.c b/progs/tests/fbotest1.c index ed72ab16dd..8f4569ff3b 100644 --- a/progs/tests/fbotest1.c +++ b/progs/tests/fbotest1.c @@ -13,6 +13,7 @@ #include #include +static int Win; static int Width = 400, Height = 400; static GLuint MyFB, MyRB; @@ -99,6 +100,7 @@ CleanUp(void) glDeleteRenderbuffersEXT(1, &MyRB); assert(!glIsFramebufferEXT(MyFB)); assert(!glIsRenderbufferEXT(MyRB)); + glutDestroyWindow(Win); exit(0); } @@ -194,7 +196,7 @@ main( int argc, char *argv[] ) glutInitWindowPosition( 0, 0 ); glutInitWindowSize(Width, Height); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); + Win = glutCreateWindow(argv[0]); glutReshapeFunc( Reshape ); glutKeyboardFunc( Key ); glutDisplayFunc( Display ); diff --git a/progs/tests/fbotexture.c b/progs/tests/fbotexture.c index 13a29db3f3..aa9f617122 100644 --- a/progs/tests/fbotexture.c +++ b/progs/tests/fbotexture.c @@ -23,6 +23,7 @@ #define DRAW 1 +static int Win = 0; static int Width = 400, Height = 400; static GLenum TexTarget = GL_TEXTURE_2D; /*GL_TEXTURE_RECTANGLE_ARB;*/ @@ -232,6 +233,8 @@ CleanUp(void) glDeleteTextures(1, &TexObj); + glutDestroyWindow(Win); + exit(0); } @@ -392,7 +395,7 @@ main(int argc, char *argv[]) glutInitWindowPosition(0, 0); glutInitWindowSize(Width, Height); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); - glutCreateWindow(argv[0]); + Win = glutCreateWindow(argv[0]); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Display); -- cgit v1.2.3