Name

glActiveTexture — select server-side active texture unit

C Specification

void glActiveTexture(GLenum texture);
 

Parameters

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_TEXTUREi, where 0 <= i < GL_MAX_TEXTURE_UNITS , which is an implementation-dependent value. The intial 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, it must be at least 2.

Errors

GL_INVALID_ENUM is generated if texture is not one of GL_TEXTUREi, where 0 <= i < GL_MAX_TEXTURE_UNITS .

Notes

It is always the case that GL_TEXTUREi = GL_TEXTURE0+i .

A texture unit consists of the texture enable state, texture matrix stack, texture environment and currently bound texture. Modifying any of these states has an effect only on the active texture unit.

Vertex arrays are client-side GL resources, which are selected by the glClientActiveTexture routine.

Associated Gets

glGet with argument GL_ACTIVE_TEXTURE or GL_MAX_TEXTURE_UNITS

See Also

glBindTexture, glClientActiveTexture, glEnable, glGet, glMatrixMode, glMultiTexCoord, glTexEnv

Copyright

Copyright © 2003-2004 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.