HP c8000 manual OpenGL correctness hints, 4D values, Texture coordinates

Page 53

programming hints

OpenGL correctness hints

OpenGL correctness hints

Hints provided in this section are intended to help you correctly use HP’s implementation of OpenGL.

4D values

When specifying 4D values, such as vertices, light positions, etc, if possible supply a w value that is not near the floating point limits of MINFLOAT or MAXFLOAT. Using w values near the floating point limits increases the likelihood of floating point precision errors in calculations such as lighting, transformations, and perspective division.

Also, performance will be best when 4D positions are normalized such that w is 1.0.

For best accuracy and performance, if you want to specify some 4D position like (0.0, 0.0, 5e10, 1.5e38), instead use the equivalent normalized position (0.0, 0.0, 3.33e-28, 1.0).

On HP Visualize fx devices only, if a light position must be specified with a w value that is near the floating point limits, consider setting

HPOGL_LIGHTING_SPACE=EC

to ensure that lighting occurs in Eye Space. This will eliminate an extra transformation of the light position, giving the best possible solution.

texture coordinates

When using non-orthographic projection, keep in mind the texture coordinates will be divided by w as an intermediate calculation. HP’s implementation of OpenGL estimates that for VMD, the texture coordinates used in perspective projections will have only five significant digits of precision. Therefore, when you have texturing close to a window edge and the decomposition of the primitive causes the vertices to have very closely-spaced texture coordinates after perspective projection, you may see loss of texturing precision. This loss of precision may make the texture primitive seem locally smeared.

Chapter 5

51

Image 53
Contents OpenGL Implementation Guide Legal Notices Contents Installation and setup Programming hints Contents Overview of OpenGL OpenGL Reference Manual IntroductionHp’s implementation of the OpenGL libraries OpenGL productHp’s implementation of OpenGL 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 Utilities Library GLU Standard OpenGL productInput and output routines OpenGL extensions for the X Window system GLXOpenGL product Mixing of OpenGL and Xlib Gamma correction Visibility test extensions OpenGL extensionsOcclusion extension Occlusion culling code fragmentsEnumerated Types for Occlusion GLHPsupersample extension Rendering details Default visualsEXP and EXP2 fogging Bow-tie quadrilateralsVertices outside of a begin/end pair Index mode ditheringDecomposition of concave quadrilaterals Environment variables New environment variables as of release Switches to the faster double buffering method Installation and setup Installation and setup Verify that OpenGL is on your workstation Verification instructionsIs your system software preloaded with instant ignition? 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 Special considerations Virtual GLX VGL modeVisual support for the VGL mode 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 Texture coordinates OpenGL correctness hints4D values OpenGL performance hints Glcompileandexecute modeDisplay list performance Geometric primitivesDraw array set extensions State changes and their effects on display lists TexturesRegular primitive data Selection performance Texture downloading performanceState change High frame rate applications Optimization of lightingOcclusion culling 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