HP c8000 manual Rescaling normals

Page 61

programming hints

OpenGL performance hints

Single buffered applications

Alpha planes

Depth 8 visuals

Stereo

Gradient backgrounds

rescaling normals

When normal rescaling is enabled, a new operation is added to the transformation of the normal vector into eye coordinates. The normal vector is rescaled after it is multiplied by the inverse modelview matrix and before it is normalized.

The rescale factor is chosen so that in many cases, normal vectors with unit length in object coordinates will not need to be normalized as they are transformed into eye coordinates.

As of Release 1.05 of HP’s implementation of OpenGL 1.1, the

GL_RESCALE_NORMAL_EXT token is supported. It is accepted by the <cap> parameter of glEnable, glDisable, and glIsEnabled, and by the <pname> parameter of glGetBooleanv, glGetIntegerv, glGetFloatv, and glGetDoublev.

Normals that have unit length when sent to the GL, have their length changed by the inverse of the scaling factor after transformation by the model-view inverse matrix when the model-view matrix represents a uniform scale. If rescaling is enabled, then normals specified with the Normal command are rescaled after transformation by the Modelview Inverse.

Normals sent to the GL may or may not have unit length. In addition, the length of the normals after transformation might be altered due to transformation by the model-view inverse matrix. If normalization is enabled, then normals specified with the glNormal3 command are normalized after transformation by the model-view inverse matrix and after rescaling if rescaling is enabled. Normalization and rescaling are controlled with glEnable and glDisable with the target equal to NORMALIZE or RESCALE_NORMAL. This requires two bits of state. The initial state is for normals not to be normalized or rescaled.

Chapter 5

59

Image 61
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 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 quadrilateralsDecomposition 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 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 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