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,
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
Chapter 5 | 51 |