HP c8000 manual Draw array set extensions

Page 55

programming hints

OpenGL performance hints

draw array set extensions

glDrawArraySethp is a Hewlett-Packard OpenGL 1.1 extension to vertex arrays which provides a high-speed mechanism for rendering multiple primitives. Use of glDrawArraySethp will be easy for applications which currently store geometry in vertex arrays and use multiple calls to glDrawArrays for rendering primitives from the arrays.

glDrawArraySethp is especially useful when multiple connected primitives, such as GL_LINE_STRIP, GL_TRIANGLE_STRIP, etc., are consecutively drawn from a vertex array. However all OpenGL primitive types are supported.

Since only glDrawArray calls are made while rendering the vertex array set, primitive attributes, such as material colors, must be established for the entire array set or changed per vertex. If OpenGL library calls other than glDrawArrays are required during rendering the set to properly draw the array set, then glDrawArraySethp is not appropriate.

benefits of glDrawArraySethp: glDrawArrays and glDrawArraySethp provide basically the same programmatic benefits, that is reduced function calls and less user code. Note that glDrawArraySethp’s major benefit is performance. glDrawArraySethp provides from 10%-55% performance advantage over using glDrawArrays alone.

The amount of performance benefit depends upon several factors, including the number of primitives in the set, the length of the primitives in the set, and maximum rendering speed of the graphics device.

To achieve optimum glDrawArraySethp rendering performance, group as many primitives in each set as possible.

using glDrawArraySethp: To use glDrawArraySethp, the current vertex array must be set and enabled. This is done using glNormalPointer, glVertexPointer, glEnableClientState, etc., or glInterleavedArrays. After the vertex array is established and enabled, glDrawArraySethp may be used.

The C declaration of glDrawArraySethp is:

void glDrawArraySethp(GLenum mode, const GLint* list, GLsizei count);

where:

Chapter 5

53

Image 55
Contents OpenGL Implementation Guide Legal Notices Contents Installation and setup Programming hints Contents Overview of OpenGL OpenGL Reference Manual IntroductionHp’s implementation of OpenGL OpenGL productHp’s implementation of the OpenGL libraries Supported operating systems Supported graphics devicesVisual Table for HP Visualize fxe Supported visualsVisual Table for ATI Fire GL T2/X1/X3 Visual support for other graphics devices Stereo Visual Support for HP Fire GL-UXSigchld and the GRM daemon Buffer sharing between multiple processes and threadsBit programming SLS support Sample 64-bit compile and link for 11.x onlyOpenGL extensions for the X Window system GLX Standard OpenGL productOpenGL Utilities Library GLU Input and output routinesOpenGL product Mixing of OpenGL and Xlib Gamma correction Occlusion culling code fragments OpenGL extensionsVisibility test extensions Occlusion extensionEnumerated Types for Occlusion GLHPsupersample extension Bow-tie quadrilaterals Default visualsRendering details EXP and EXP2 foggingDecomposition of concave quadrilaterals Index mode ditheringVertices outside of a begin/end pair Environment variables New environment variables as of release Switches to the faster double buffering method Installation and setup Installation and setup Is your system software preloaded with instant ignition? Verification instructionsVerify that OpenGL is on your workstation Install OpenGL Installing OpenGLOpenGL Development Environment Filesets for 11.0 Check log file Verify the product OpenGL file structure 64-bit libraries are in a subdirectory OpenGL file structure Chapter Running OpenGL programs Visual support for the VGL mode Virtual GLX VGL modeSpecial considerations Bool hpglXDisplayIsVGLDisplay *dpy, int screen Running hps implementation of the OpenGL stereo application Running hps implementation of the OpenGL stereo application Running OpenGL programs Compiling and linking programs Subdirectory This Directory Contains OverviewIncluding header files Linking shared libraries Compiling 32-bit and 64-bit applications for OpenGL OpenGL procedure calls Programming hints Programming hints 4D values OpenGL correctness hintsTexture coordinates Geometric primitives Glcompileandexecute modeOpenGL performance hints Display list performanceDraw array set extensions State changes and their effects on display lists TexturesRegular primitive data Selection performance Texture downloading performanceState change Occlusion culling Optimization of lightingHigh frame rate applications Rescaling normals OpenGL performance hints
Related manuals
Manual 27 pages 63.95 Kb Manual 8 pages 32.71 Kb Manual 89 pages 28.35 Kb