diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-06-28 22:03:44 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-06-28 22:03:44 +0000 |
commit | dbe1ecaa1d82be41c1d2f2ae2e78e8bd69a62b19 (patch) | |
tree | fdfc1583d97fc4025c321ee42be2474611fcd043 /progs/demos | |
parent | 36bdb0786001a138547064b408e7a025d896fc74 (diff) |
option to test with display lists
Diffstat (limited to 'progs/demos')
-rw-r--r-- | progs/demos/arbocclude.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/progs/demos/arbocclude.c b/progs/demos/arbocclude.c index 30d95dfd67..3735f7de43 100644 --- a/progs/demos/arbocclude.c +++ b/progs/demos/arbocclude.c @@ -32,6 +32,7 @@ #define GL_GLEXT_PROTOTYPES #include <GL/glut.h> +#define TEST_DISPLAY_LISTS 0 static GLboolean Anim = GL_TRUE; static GLfloat Xpos = 0; @@ -114,7 +115,14 @@ static void Display( void ) glScalef(0.3, 0.3, 1.0); glRotatef(-90.0 * Xpos, 0, 0, 1); +#if TEST_DISPLAY_LISTS + glNewList(10, GL_COMPILE); glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery); + glEndList(); + glCallList(10); +#else + glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery); +#endif glColorMask(0, 0, 0, 0); glDepthMask(GL_FALSE); @@ -126,7 +134,14 @@ static void Display( void ) glVertex3f(-1, 1, 0); glEnd(); +#if TEST_DISPLAY_LISTS + glNewList(11, GL_COMPILE); + glEndQueryARB(GL_SAMPLES_PASSED_ARB); + glEndList(); + glCallList(11); +#else glEndQueryARB(GL_SAMPLES_PASSED_ARB); +#endif do { /* do useful work here, if any */ @@ -229,8 +244,11 @@ static void Init( void ) exit(-1); } + glGetIntegerv(GL_DEPTH_BITS, &bits); + printf("Depthbits: %d\n", bits); + glGenQueriesARB(1, &OccQuery); - assert( glIsQueryARB(OccQuery) ); + assert(OccQuery > 0); glEnable(GL_DEPTH_TEST); } |