1GLGETTEXENV(3G) OpenGL Manual GLGETTEXENV(3G)
2
3
4
6 glGetTexEnv - return texture environment parameters
7
9 void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params);
10
11 void glGetTexEnviv(GLenum target, GLenum pname, GLint * params);
12
14 target
15 Specifies a texture environment. May be GL_TEXTURE_ENV,
16 GL_TEXTURE_FILTER_CONTROL, or GL_POINT_SPRITE.
17
18 pname
19 Specifies the symbolic name of a texture environment parameter.
20 Accepted values are GL_TEXTURE_ENV_MODE, GL_TEXTURE_ENV_COLOR,
21 GL_TEXTURE_LOD_BIAS, GL_COMBINE_RGB, GL_COMBINE_ALPHA, GL_SRC0_RGB,
22 GL_SRC1_RGB, GL_SRC2_RGB, GL_SRC0_ALPHA, GL_SRC1_ALPHA,
23 GL_SRC2_ALPHA, GL_OPERAND0_RGB, GL_OPERAND1_RGB, GL_OPERAND2_RGB,
24 GL_OPERAND0_ALPHA, GL_OPERAND1_ALPHA, GL_OPERAND2_ALPHA,
25 GL_RGB_SCALE, GL_ALPHA_SCALE, or GL_COORD_REPLACE.
26
27 params
28 Returns the requested data.
29
31 glGetTexEnv returns in params selected values of a texture environment
32 that was specified with glTexEnv(). target specifies a texture
33 environment.
34
35 When target is GL_TEXTURE_FILTER_CONTROL, pname must be
36 GL_TEXTURE_LOD_BIAS. When target is GL_POINT_SPRITE, pname must be
37 GL_COORD_REPLACE. When target is GL_TEXTURE_ENV, pname can be
38 GL_TEXTURE_ENV_MODE, GL_TEXTURE_ENV_COLOR, GL_COMBINE_RGB,
39 GL_COMBINE_ALPHA, GL_RGB_SCALE, GL_ALPHA_SCALE, GL_SRC0_RGB,
40 GL_SRC1_RGB, GL_SRC2_RGB, GL_SRC0_ALPHA, GL_SRC1_ALPHA, or
41 GL_SRC2_ALPHA.
42
43 pname names a specific texture environment parameter, as follows:
44
45 GL_TEXTURE_ENV_MODE
46 params returns the single-valued texture environment mode, a
47 symbolic constant. The initial value is GL_MODULATE.
48
49 GL_TEXTURE_ENV_COLOR
50 params returns four integer or floating-point values that are the
51 texture environment color. Integer values, when requested, are
52 linearly mapped from the internal floating-point representation
53 such that 1.0 maps to the most positive representable integer, and
54 -1.0 maps to the most negative representable integer. The initial
55 value is (0, 0, 0, 0).
56
57 GL_TEXTURE_LOD_BIAS
58 params returns a single floating-point value that is the texture
59 level-of-detail bias. The initial value is 0.
60
61 GL_COMBINE_RGB
62 params returns a single symbolic constant value representing the
63 current RGB combine mode. The initial value is GL_MODULATE.
64
65 GL_COMBINE_ALPHA
66 params returns a single symbolic constant value representing the
67 current alpha combine mode. The initial value is GL_MODULATE.
68
69 GL_SRC0_RGB
70 params returns a single symbolic constant value representing the
71 texture combiner zero's RGB source. The initial value is
72 GL_TEXTURE.
73
74 GL_SRC1_RGB
75 params returns a single symbolic constant value representing the
76 texture combiner one's RGB source. The initial value is
77 GL_PREVIOUS.
78
79 GL_SRC2_RGB
80 params returns a single symbolic constant value representing the
81 texture combiner two's RGB source. The initial value is
82 GL_CONSTANT.
83
84 GL_SRC0_ALPHA
85 params returns a single symbolic constant value representing the
86 texture combiner zero's alpha source. The initial value is
87 GL_TEXTURE.
88
89 GL_SRC1_ALPHA
90 params returns a single symbolic constant value representing the
91 texture combiner one's alpha source. The initial value is
92 GL_PREVIOUS.
93
94 GL_SRC2_ALPHA
95 params returns a single symbolic constant value representing the
96 texture combiner two's alpha source. The initial value is
97 GL_CONSTANT.
98
99 GL_OPERAND0_RGB
100 params returns a single symbolic constant value representing the
101 texture combiner zero's RGB operand. The initial value is
102 GL_SRC_COLOR.
103
104 GL_OPERAND1_RGB
105 params returns a single symbolic constant value representing the
106 texture combiner one's RGB operand. The initial value is
107 GL_SRC_COLOR.
108
109 GL_OPERAND2_RGB
110 params returns a single symbolic constant value representing the
111 texture combiner two's RGB operand. The initial value is
112 GL_SRC_ALPHA.
113
114 GL_OPERAND0_ALPHA
115 params returns a single symbolic constant value representing the
116 texture combiner zero's alpha operand. The initial value is
117 GL_SRC_ALPHA.
118
119 GL_OPERAND1_ALPHA
120 params returns a single symbolic constant value representing the
121 texture combiner one's alpha operand. The initial value is
122 GL_SRC_ALPHA.
123
124 GL_OPERAND2_ALPHA
125 params returns a single symbolic constant value representing the
126 texture combiner two's alpha operand. The initial value is
127 GL_SRC_ALPHA.
128
129 GL_RGB_SCALE
130 params returns a single floating-point value representing the
131 current RGB texture combiner scaling factor. The initial value is
132 1.0.
133
134 GL_ALPHA_SCALE
135 params returns a single floating-point value representing the
136 current alpha texture combiner scaling factor. The initial value is
137 1.0.
138
139 GL_COORD_REPLACE
140 params returns a single boolean value representing the current
141 point sprite texture coordinate replacement enable state. The
142 initial value is GL_FALSE.
143
145 If an error is generated, no change is made to the contents of params.
146
147 For OpenGL versions 1.3 and greater, or when the ARB_multitexture
148 extension is supported, glGetTexEnv returns the texture environment
149 parameters for the active texture unit.
150
151 GL_COMBINE_RGB, GL_COMBINE_ALPHA, GL_SRC0_RGB, GL_SRC1_RGB,
152 GL_SRC2_RGB, GL_SRC0_ALPHA, GL_SRC1_ALPHA, GL_SRC2_ALPHA,
153 GL_OPERAND0_RGB, GL_OPERAND1_RGB, GL_OPERAND2_RGB, GL_OPERAND0_ALPHA,
154 GL_OPERAND1_ALPHA, GL_OPERAND2_ALPHA, GL_RGB_SCALE, and GL_ALPHA_SCALE
155 are available only if the GL version is 1.3 or greater.
156
157 GL_TEXTURE_FILTER_CONTROL and GL_TEXTURE_LOD_BIAS are available only if
158 the GL version is 1.4 or greater.
159
160 GL_POINT_SPRITE and GL_COORD_REPLACE are available only if the GL
161 version is 2.0 or greater.
162
164 GL_INVALID_ENUM is generated if target or pname is not an accepted
165 value.
166
167 GL_INVALID_OPERATION is generated if glGetTexEnv is executed between
168 the execution of glBegin() and the corresponding execution of glEnd().
169
171 glActiveTexture(), glTexEnv()
172
174 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
175 under the SGI Free Software B License. For details, see
176 http://oss.sgi.com/projects/FreeB/.
177
179 opengl.org
180
181
182
183opengl.org 06/10/2014 GLGETTEXENV(3G)