Click or drag to resize

TextureBind Method

Binds the texture.

Namespace:  Ooogles
Assembly:  Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void Bind()
Remarks
Lets you create or use a named texture. Binds the texture name to the target of the current active texture unit. When a texture is bound to a target, the previous binding for that target is automatically broken.

When a texture is first bound, it assumes the specified target: A first bound texture of type TwoD becomes a two-dimensional texture and a first bound texture of type CubeMap becomes a cube-mapped texture. The state of a two-dimensional texture immediately after it is first bound is equivalent to the state of the default texture at GL initialization.

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. 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 remains active until a different texture is bound to the same target, or until the bound texture is deleted.

Once created, a named texture may be re-bound to its same original target as often as needed. It is usually much faster to use Bind to bind an existing named texture to one of the texture targets than it is to reload the texture image using UploadT(glPixelFormat, Int32, Int32, T, Int32, glPixelDataType, Int32).

OpenGL API: glBindTexture

See Also