fglBindTexture(3G) OpenGL Reference fglBindTexture(3G)NAMEfglBindTexture - bind a named texture to a texturing target
FORTRAN SPECIFICATION
SUBROUTINE fglBindTexture( INTEGER*4 target,
INTEGER*4 texture )
PARAMETERS
target Specifies the target to which the texture is bound. Must be
either GL_TEXTURE_1D, GL_TEXTURE_2D, or GL_TEXTURE_3D.
texture Specifies the name of a texture.
DESCRIPTIONfglBindTexture lets you create or use a named texture. Calling
fglBindTexture with target set to GL_TEXTURE_1D, GL_TEXTURE_2D,
GL_TEXTURE_3D 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 fglXCreateContext) of the current GL rendering context; two
rendering contexts share texture names only if they also share display
lists.
You may use fglGenTextures 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 GL_TEXTURE_1D becomes one-dimensional,
and a texture first bound to GL_TEXTURE_2D becomes two-dimensional, and a
texture first bound to GL_TEXTURE_3D becomes a three-dimensional texture.
The state of a one-dimensional texture immediately after it is first
bound is equivalent to the state of the default GL_TEXTURE_1D at GL
initialization, and similarly for two-, and three-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 fglBindTexture remains active until a
different texture is bound to the same target, or until the bound texture
is deleted with fglDeleteTextures.
Page 1
fglBindTexture(3G) OpenGL Reference fglBindTexture(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 fglBindTexture to bind an existing named texture to one of the
texture targets than it is to reload the texture image using
fglTexImage1D, fglTexImage2D, or fglTexImage3D. For additional control
over performance, use fglPrioritizeTextures.
fglBindTexture is included in display lists.
NOTESfglBindTexture is available only if the GL version is 1.1 or greater.
ERRORS
GL_INVALID_ENUM is generated if target is not one of the allowable
values.
GL_INVALID_OPERATION is generated if texture has a dimensionality that
doesn't match that of target.
GL_INVALID_OPERATION is generated if fglBindTexture is executed between
the execution of fglBegin and the corresponding execution of fglEnd.
ASSOCIATED GETS
fglGet with argument GL_TEXTURE_BINDING_1D
fglGet with argument GL_TEXTURE_BINDING_2D
fglGet with argument GL_TEXTURE_BINDING_3D
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
fglAreTexturesResident, fglDeleteTextures, fglGenTextures, fglGet,
fglGetTexParameter, fglIsTexture, fglPrioritizeTextures, fglTexImage1D,
fglTexImage2D, fglTexParameter
Page 2