Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ glbindtexture(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



glBindTexture(3G)              OpenGL Reference              glBindTexture(3G)



NAME
     glBindTexture - bind a named texture to a texturing target


C SPECIFICATION
     void glBindTexture( GLenum target,
                         GLuint texture )


PARAMETERS
     target   Specifies the target to which the texture is bound.  Must be
              either GLTEXTURE1D or GLTEXTURE2D.

     texture  Specifies the name of a texture.

DESCRIPTION
     glBindTexture lets you create or use a named texture. Calling
     glBindTexture with target set to GLTEXTURE1D or GLTEXTURE2D and
     texture set to the name of the newtexture binds the texture name to the
     target. When a texture is bound to a target, the previous binding for
     that target is automatically broken.

     Texture names are unsigned integers. The value zero is reserved to
     represent the default texture for each texture target.  Texture names and
     the corresponding texture contents are local to the shared display-list
     space (see glXCreateContext) of the current GL rendering context; two
     rendering contexts share texture names only if they also share display
     lists.

     You may use glGenTextures to generate a set of new texture names.

     When a texture is first bound, it assumes the dimensionality of its
     target:  A texture first bound to GLTEXTURE1D becomes 1-dimensional and
     a texture first bound to GLTEXTURE2D becomes 2-dimensional. The state
     of a 1-dimensional texture immediately after it is first bound is
     equivalent to the state of the default GLTEXTURE1D at GL
     initialization, and similarly for 2-dimensional textures.

     While a texture is bound, GL operations on the target to which it is
     bound affect the bound texture, and queries of the target to which it is
     bound return state from the bound texture. If texture mapping of the
     dimensionality of the target to which a texture is bound is active, the
     bound texture is used.  In effect, the texture targets become aliases for
     the textures currently bound to them, and the texture name zero refers to
     the default textures that were bound to them at initialization.

     A texture binding created with glBindTexture remains active until a
     different texture is bound to the same target, or until the bound texture
     is deleted with glDeleteTextures.






                                                                        Page 1





glBindTexture(3G)              OpenGL Reference              glBindTexture(3G)



     Once created, a named texture may be re-bound to the target of the
     matching dimensionality as often as needed.  It is usually much faster to
     use glBindTexture to bind an existing named texture to one of the texture
     targets than it is to reload the texture image using glTexImage1D or
     glTexImage2D.  For additional control over performance, use
     glPrioritizeTextures.

     glBindTexture is included in display lists.

NOTES
     glBindTexture is available only if the GL version is 1.1 or greater.

ERRORS
     GLINVALIDENUM is generated if target is not one of the allowable
     values.

     GLINVALIDOPERATION is generated if texture has a dimensionality which
     doesn't match that of target.

     GLINVALIDOPERATION is generated if glBindTexture is executed between
     the execution of glBegin and the corresponding execution of glEnd.

ASSOCIATED GETS
     glGet with argument GLTEXTURE1DBINDING
     glGet with argument GLTEXTURE2DBINDING


MACHINE DEPENDENCIES
     RealityEngine, RealityEngine2, and VTX systems do not support texture
     name sharing.  Texture names are always local to the rendering context
     which was active at the time the names were created.

     The implementation on O2 systems uses a minimum of 64K bytes for every
     texture object defined.


SEE ALSO
     glAreTexturesResident, glDeleteTextures, glGenTextures, glGet,
     glGetTexParameter, glIsTexture, glPrioritizeTextures, glTexImage1D,
     glTexImage2D, glTexParameter















                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026