glActiveTexture

select active texture unit

Signature

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

Parameters

VariablesDescription
texture
Specifies which texture unit to make active. The number of texture units is implementation dependent, but must be at least 80. texture must be one of GL_TEXTURE i , where i ranges from zero to the value of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS minus one. 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 80.

Errors

GL_INVALID_ENUM is generated if texture is not one of GL_TEXTURE i , where i ranges from zero to the value of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS minus one.

Associated Gets

glGet with argument GL_ACTIVE_TEXTURE , or GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS .

Version Support

glActiveTexture

See Also

Copyright

Copyright
1991-2006 Silicon Graphics, Inc. Copyright
2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see .

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: 231, 255
OpenGLContext tests/nehe6_multi.py Lines: 26, 27, 85, 95, 113
OpenGLContext tests/pygame_textureatlas.py Lines: 128, 153
OpenGLContext tests/shader_11.py Lines: 255, 261
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 88, 98, 111, 115
{LGPL} VisionEgg VisionEgg/PlatformDependent.py Lines: 226, 226, 227, 244
{LGPL} VisionEgg VisionEgg/GLTrace.py Lines: 136
{LGPL} VisionEgg VisionEgg/Core.py Lines: 1719
Visvis core/baseTexture.py Lines: 212, 246, 254
{GPL3} OpenGL-Programmable 05-shader.py Lines: 102
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 119
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 137
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 110
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 145
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 119