From: Brian Paul Date: Mon, 28 Jun 2004 22:03:44 +0000 (+0000) Subject: option to test with display lists X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbe1ecaa1d82be41c1d2f2ae2e78e8bd69a62b19;p=mesa.git option to test with display lists --- diff --git a/progs/demos/arbocclude.c b/progs/demos/arbocclude.c index 30d95dfd673..3735f7de438 100644 --- a/progs/demos/arbocclude.c +++ b/progs/demos/arbocclude.c @@ -32,6 +32,7 @@ #define GL_GLEXT_PROTOTYPES #include +#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); }