summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/winpos.c2
-rw-r--r--progs/tests/fbotest1.c4
-rw-r--r--progs/tests/fbotexture.c5
-rw-r--r--progs/tests/sharedtex.c22
-rw-r--r--progs/tools/trace/gltrace_support.cc3
5 files changed, 22 insertions, 14 deletions
diff --git a/progs/demos/winpos.c b/progs/demos/winpos.c
index 2ee1df69fbc..3a1a19ecdb9 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;
diff --git a/progs/tests/fbotest1.c b/progs/tests/fbotest1.c
index ed72ab16dd8..8f4569ff3b4 100644
--- a/progs/tests/fbotest1.c
+++ b/progs/tests/fbotest1.c
@@ -13,6 +13,7 @@
#include <math.h>
#include <GL/glut.h>
+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 13a29db3f35..aa9f6171221 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);
diff --git a/progs/tests/sharedtex.c b/progs/tests/sharedtex.c
index ebe73f19f42..7be90d67f55 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);
diff --git a/progs/tools/trace/gltrace_support.cc b/progs/tools/trace/gltrace_support.cc
index fb0404c450e..b188e73f29e 100644
--- a/progs/tools/trace/gltrace_support.cc
+++ b/progs/tools/trace/gltrace_support.cc
@@ -20,6 +20,7 @@
*/
#include "gltrace_support.h"
+#include <assert.h>
#include <sstream>
#include <fstream>
#include <iomanip>
@@ -34,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));