Finally, let m = 2 sqrt(f
coordinates are
s = f
t = f
To enable or disable a texture-coordinate generation function, call glEnable or glDisable
with one of the symbolic texture-coordinate names (GL_TEXTURE_GEN_S,
GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R, or GL_TEXTURE_GEN_Q) as the
argument. When enabled, the specified texture coordinate is computed according to the
generating function associated with that coordinate. When disabled, subsequent vertices
take the specified texture coordinate from the current set of texture coordinates.
Initially, all texture generation functions are set to GL_EYE_LINEAR and are disabled.
Both s plane equations are (1, 0, 0, 0), both t plane equations are (0, 1, 0, 0), and all r and
q plane equations are (0, 0, 0, 0).
Errors
•
•
•
Associated Gets
glGetTexGen
glIsEnabled with argument GL_TEXTURE_GEN_S
glIsEnabled with argument GL_TEXTURE_GEN_T
glIsEnabled with argument GL_TEXTURE_GEN_R
glIsEnabled with argument GL_TEXTURE_GEN_Q
See Also
glCopyPixels,
glCopyTexImage2D,
glCopyTexSubImage1D,
glCopyTexSubImage2D,
glTexEnv,
glTexImage1D,
glTexImage2D,
glTexParameter,
glTexSubImage1D,
glTexSubImage2D
Chapter 18
2
+ f
x
/m + 1/2
x
/m + 1/2
y
GL_INVALID_ENUM is generated when coord or pname is not an accepted defined
value, or when pname is GL_TEXTURE_GEN_MODE and params is not an
accepted defined value.
GL_INVALID_ENUM is generated when pname is GL_TEXTURE_GEN_MODE,
params is GL_SPHERE_MAP, and coord is either GL_R or GL_Q.
GL_INVALID_OPERATION is generated if glTexGen is executed between the
execution of glBegin and the corresponding execution of glEnd.
2
2
+ (f
+ 1)
). Then the values assigned to the s and t texture
y
z
T
glTexGen
433