HP c8000 manual Optimization of lighting, Occlusion culling, High frame rate applications

Page 60

programming hints

OpenGL performance hints

Grouping your state changes together (that is, several modal state changes at one time), and then rendering primitives, will provide better performance than doing the modal state changes one by one and intermixing them with primitives.

Grouping primitives that require the same modal state together to minimize modal state changes. For example, if only part of a scene’s primitives are lighted, draw all the lighted primitives, then turn off lighting and draw all the unlighted primitives, rather than enabling/disabling lighting many times.

Some states negatively impact performance, such as two-sided lighting, polygon mode GL_LINE, and wide lines.

optimization of lighting

HP’s implementation of OpenGL optimizes the lighting case such that the performance degradation from one light to two or more lights is linear. Lighting performance does not degrade noticeably when you enable a second light. In addition, the GL_SHININESS material parameter is not particularly expensive to change.

occlusion culling

The proper use of HP’s occlusion culling extension can dramatically improve rendering performance. This extension defines a mechanism for determining the non-visibility of complex geometry based on the non-visibility of a bounding geometry. This feature can greatly reduce the amount of geometry processing and rendering required by an application, thereby, increasing the applications performance. For more information on occlusion culling, see the section “Occlusion Extension” found in Chapter 1.

high frame rate applications

To achieve maximum performance for buffer swap and clear operations across the entire family of Visualize and OEM graphics devices, avoid the following:

Scissor rectangle smaller than the window size

Non-trivial plane masks, i.e., any value other than all zeros or all ones

58

Chapter 5

Image 60
Contents OpenGL Implementation Guide Legal Notices Contents Installation and setup Programming hints Contents Overview of OpenGL Introduction OpenGL Reference ManualOpenGL product Hp’s implementation of OpenGLHp’s implementation of the OpenGL libraries Supported graphics devices Supported operating systemsSupported visuals Visual Table for HP Visualize fxeVisual Table for ATI Fire GL T2/X1/X3 Stereo Visual Support for HP Fire GL-UX Visual support for other graphics devicesBuffer sharing between multiple processes and threads Sigchld and the GRM daemonBit programming Sample 64-bit compile and link for 11.x only SLS supportStandard OpenGL product OpenGL Utilities Library GLUInput and output routines OpenGL extensions for the X Window system GLXOpenGL product Mixing of OpenGL and Xlib Gamma correction OpenGL extensions Visibility test extensionsOcclusion extension Occlusion culling code fragmentsEnumerated Types for Occlusion GLHPsupersample extension Default visuals Rendering detailsEXP and EXP2 fogging Bow-tie quadrilateralsIndex mode dithering Decomposition of concave quadrilateralsVertices 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 Verification instructions Is your system software preloaded with instant ignition?Verify that OpenGL is on your workstation Installing OpenGL Install 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 Virtual GLX VGL mode Visual support for the 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 Overview Subdirectory This Directory ContainsIncluding header files Linking shared libraries Compiling 32-bit and 64-bit applications for OpenGL OpenGL procedure calls Programming hints Programming hints OpenGL correctness hints 4D valuesTexture coordinates Glcompileandexecute mode OpenGL performance hintsDisplay list performance Geometric primitivesDraw array set extensions Textures State changes and their effects on display listsRegular primitive data Texture downloading performance Selection performanceState change Optimization of lighting Occlusion cullingHigh 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