HP Workstation zx2000 Implementation Manual page 19

Hp opengl implementation guide for hp-ux 11.x (ipf version) (5969-3152)
Hide thumbs Also See for Workstation zx2000:
Table of Contents

Advertisement

The following is a sample code segment of how the visibility test extension might be used.
#define NUMTESTS 1000
GLboolean
visBuffer[NUMTESTS],
visstuff[2];
glVisibilityBufferHP(NUMTESTS,visBuffer,GL_TRUE);
glEnable(GL_VISIBILITY_TEST_HP);
// We don't actually want to touch the Color or Depth buffers...
glDepthMask(GL_FALSE);
glColorMask(GL_FALSE, GL_FALSE,GL_FALSE,GL_FALSE);
for ( [Each object to be tested] )
{
<Render Object's bounding box>
// Move on to the next test
glNextVisibilityTestHP();
}
glDisable(GL_VISIBILITY_TEST_HP);
glGetBooleanv(GL_VISIBILITY_TEST_HP, visstuff);
// Turn these back on for rendering the objects
glDepthMask(GL_TRUE);
glColorMask(GL_TRUE, GL_TRUE,GL_TRUE,GL_TRUE);
for ( i=0; i < [Num Objects Tested] )
{
if (visBuffer[i] )
{
[ Render the ith Object ]
}
}
OpenGL implementation guide
overview of OpenGL
1–15

Advertisement

Table of Contents
loading

This manual is also suitable for:

Workstation zx6000

Table of Contents