Previous: glAccum Table of Contents (GL) Next: glAlphaFunc

glActiveTexture

select active texture unit

Signature

glActiveTexture( GLenum ( texture ) )-> void
glActiveTexture( texture )
glActiveTexture(GLenum(texture)) -> None

Parameters

VariablesDescription
texture
Specifies which texture unit to make active. The number of texture units is implementation dependent, but must be at least two. texture must be one of GL_TEXTURE i , where i ranges from 0 to the larger of ( GL_MAX_TEXTURE_COORDS - 1) and ( GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1). The initial value is GL_TEXTURE0 .

Description

glActiveTexture selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation dependent, but must be at least 2.
Vertex arrays are client-side GL resources, which are selected by the glClientActiveTexture routine.

Notes

glActiveTexture is only supported if the GL version is 1.3 or greater, or if
ARB_multitexture
is included in the string returned by glGetString when called with the argument GL_EXTENSIONS .

Errors

GL_INVALID_ENUM is generated if texture is not one of GL_TEXTURE i , where i ranges from 0 to the larger of ( GL_MAX_TEXTURE_COORDS - 1) and ( GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1).

Associated Gets

glGet with argument GL_ACTIVE_TEXTURE , GL_MAX_TEXTURE_COORDS , or GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS

See Also

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glActiveTexture
OpenGLContext OpenGLContext/scenegraph/shaders.py Lines: 123
OpenGLContext tests/pygame_textureatlas.py Lines: 128, 153
OpenGLContext tests/nehe6_multi.py Lines: 26, 27, 85, 95, 113
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 90, 100, 113, 117
{LGPL} VisionEgg VisionEgg/Core.py Lines: 1717
{LGPL} VisionEgg VisionEgg/PlatformDependent.py Lines: 226, 226, 227, 244
{LGPL} VisionEgg VisionEgg/GLTrace.py Lines: 136
Previous: glAccum Table of Contents (GL) Next: glAlphaFunc