Difference between revisions of "GLAPI/glActiveTexture"

From OpenGL.org
Jump to: navigation, search
m (Bot: Adding better formatting.)
m (Bot: Adding better formatting.)
(One intermediate revision by the same user not shown)
Line 11: Line 11:
  
 
; texture
 
; texture
: Specifies which texture unit to make active. The number of texture units is implementation dependent, but must be at least 80. {{param|texture}} must be one of {{code|GL_TEXTURE''i''}}, where ''i'' ranges from 0 ({{code|GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS}} - 1). The initial value is {{code|GL_TEXTURE0}}.
+
: Specifies which texture unit to make active. The number of texture units is implementation dependent, but must be at least 80. {{param|texture}} must be one of {{enum|GL_TEXTURE''i''}}, where ''i'' ranges from 0 ({{enum|GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS}} - 1). The initial value is {{enum|GL_TEXTURE0}}.
  
 
== Description ==
 
== Description ==
Line 19: Line 19:
 
== Errors ==
 
== Errors ==
  
{{code|GL_INVALID_ENUM}} is generated if {{param|texture}} is not one of {{code|GL_TEXTURE''i''}}, where ''i'' ranges from 0 to ({{code|GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS}} - 1).
+
{{enum|GL_INVALID_ENUM}} is generated if {{param|texture}} is not one of {{enum|GL_TEXTURE''i''}}, where ''i'' ranges from 0 to ({{enum|GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS}} - 1).
  
 
== Associated Gets ==
 
== Associated Gets ==
  
{{apifunc|glGet}} with argument {{code|GL_ACTIVE_TEXTURE}}, or {{code|GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS}}.
+
{{apifunc|glGet}} with argument {{enum|GL_ACTIVE_TEXTURE}}, or {{enum|GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS}}.
  
 
== See Also ==
 
== See Also ==
  
{{apifunc|glGenTextures}}, {{apifunc|glBindTexture}}, {{apifunc|glCompressedTexImage1D}}, {{apifunc|glCompressedTexImage2D}}, {{apifunc|glCompressedTexImage3D}}, {{apifunc|glCompressedTexSubImage1D}}, {{apifunc|glCompressedTexSubImage2D}}, {{apifunc|glCompressedTexSubImage3D}}, {{apifunc|glCopyTexImage1D}}, {{apifunc|glCopyTexImage2D}}, {{apifunc|glCopyTexSubImage1D}}, {{apifunc|glCopyTexSubImage2D}}, {{apifunc|glCopyTexSubImage3D}}, {{apifunc|glDeleteTextures}}{{apifunc|glIsTexture}}, {{apifunc|glTexImage1D}}, {{apifunc|glTexImage2D}}, {{apifunc|glTexImage2DMultisample}}, {{apifunc|glTexImage3D}}, {{apifunc|glTexImage3DMultisample}}, {{apifunc|glTexSubImage1D}}, {{apifunc|glTexSubImage2D}}, {{apifunc|glTexSubImage3D}}, {{apifunc|glTexParameter}},
+
{{apifunc|glBindTexture}}, {{apifunc|glCompressedTexImage1D}}, {{apifunc|glCompressedTexImage2D}}, {{apifunc|glCompressedTexImage3D}}, {{apifunc|glCompressedTexSubImage1D}}, {{apifunc|glCompressedTexSubImage2D}}, {{apifunc|glCompressedTexSubImage3D}}, {{apifunc|glCopyTexImage1D}}, {{apifunc|glCopyTexImage2D}}, {{apifunc|glCopyTexSubImage1D}}, {{apifunc|glCopyTexSubImage2D}}, {{apifunc|glCopyTexSubImage3D}}, {{apifunc|glGetTexImage}}, {{apifunc|glGetTexLevelParameter}}, {{apifunc|glGetTexParameter}}, {{apifunc|glGetCompressedTexImage}}, {{apifunc|glGenerateMipmap}}, {{apifunc|glTexBuffer}}, {{apifunc|glTexBufferRange}}, {{apifunc|glTexImage1D}}, {{apifunc|glTexImage2D}}, {{apifunc|glTexImage2DMultisample}}, {{apifunc|glTexImage3D}}, {{apifunc|glTexImage3DMultisample}}, {{apifunc|glTexStorage1D}}, {{apifunc|glTexStorage2D}}, {{apifunc|glTexStorage3D}}, {{apifunc|glTexSubImage1D}}, {{apifunc|glTexSubImage2D}}, {{apifunc|glTexSubImage3D}}, {{apifunc|glTexParameter}}
  
 
== Copyright ==
 
== Copyright ==

Revision as of 15:29, 27 September 2012

glActiveTexture
Core in version 4.5
Core since version 1.1

glActiveTexture: select active texture unit

Function Definition

 void glActiveTexture(GLenum texture​);
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_TEXTUREi, where i ranges from 0 (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 80.

Errors

GL_INVALID_ENUM is generated if texture​ is not one of GL_TEXTUREi, where i ranges from 0 to (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1).

Associated Gets

glGet with argument GL_ACTIVE_TEXTURE, or GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS.

See Also

glBindTexture, glCompressedTexImage1D, glCompressedTexImage2D, glCompressedTexImage3D, glCompressedTexSubImage1D, glCompressedTexSubImage2D, glCompressedTexSubImage3D, glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D, glCopyTexSubImage2D, glCopyTexSubImage3D, glGetTexImage, glGetTexLevelParameter, glGetTexParameter, glGetCompressedTexImage, glGenerateMipmap, glTexBuffer, glTexBufferRange, glTexImage1D, glTexImage2D, glTexImage2DMultisample, glTexImage3D, glTexImage3DMultisample, glTexStorage1D, glTexStorage2D, glTexStorage3D, glTexSubImage1D, glTexSubImage2D, glTexSubImage3D, glTexParameter

Copyright

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