GL_APICALL void GL_APIENTRY glBindTexture(
GLenum target,
GLuint texture
);
| Name | Description | |
|---|---|---|
| in | target | Bind target |
| in | texture | Texture object |
Binds a texture object to the current bind target.
Set target to GL_TEXTURE_COLLECTION_DMP for a texture collection object, GL_LUT_TEXTUREi_DMP for a lookup table object, or GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP from the Open GL ES 2.0 standard otherwise.
The value of i is greater than or equal to 0 and is at least one less than the value obtained from glGetIntegerv with GL_MAX_LUT_TEXTURES_DMP specified.
If a lookup table object has no default texture object and a value of 0 is bound, the lookup table is disabled.
Set texture to a texture object generated by glGenTextures. If you specify a nonexistent texture object, a new texture object of that name is created simultaneously.
There are four types of texture objects: 2D texture objects (GL_TEXTURE_2D), cube-map texture objects (GL_TEXTURE_CUBE_MAP), lookup table objects (GL_LUT_TEXTUREi_DMP), and texture collection objects (GL_TEXTURE_COLLECTION_DMP). Once this function is called, the object type of texture is fixed; it can no longer be bound to another type of bind target. A GL_INVALID_OPERATION error occurs when you bind an object to a bind target of a different type.
This function generates the following errors.
| GL_INVALID_ENUM | The target argument was set to an invalid value. |
|---|---|
| GL_OUT_OF_MEMORY | Failed to allocate the management region. |
| GL_INVALID_OPERATION | Already bound to a bind target of a different type. |
CONFIDENTIAL