programming hints

OpenGL performance hints

Therefore, if the modelview matrix is M, the transformed plane equation is:

the rescaled normal is

and the fully transformed normal is

If rescaling is disabled, f is 1, otherwise f is computed as follows:

Let mij denote the matrix element in row i and column j of M-1, numbering the topmost row of the matrix as row 1, and the left most column as column 1. Then

Alternatively, an implementation may chose to normalize the normal instead of rescaling the normal. Then

If normalization is disabled, then the square root in equation 2.1 is replaced with 1; otherwise, it is calculated as dictated by the OpenGL Spec. If both normalize and rescale are enabled, HP’s implementation skips the rescale and does only the normalize.

60

Chapter 5

Page 62
Image 62
HP c8000 manual OpenGL performance hints