Export to GitHub

glextensions - GL_EXT_texture_object.wiki


Contents

  • Dependencies
  • Overview
  • New Procedures and Functions
  • New Tokens
  • Errors
  • New State
  • New Implementation Dependent State

Dependencies

GL_EXT_texture3D affects the definition of this extension

Overview

This extension introduces named texture objects. The only way to name a texture in GL 1.0 is by defining it as a single display list. Because display lists cannot be edited, these objects are static. Yet it is important to be able to change the images and parameters of a texture.

New Procedures and Functions

``` void GenTexturesEXT(sizei n, uint* textures);

void DeleteTexturesEXT(sizei n, const uint* textures);

void BindTextureEXT(enum target, uint texture);

void PrioritizeTexturesEXT(sizei n, const uint* textures, const clampf* priorities);

boolean AreTexturesResidentEXT(sizei n, const uint* textures, boolean* residences);

boolean IsTextureEXT(uint texture); ```

New Tokens

Accepted by the

<pname>

parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv:

|TEXTURE_PRIORITY_EXT |0x8066| |:---------------------------------|:-----|

Accepted by the

<pname>

parameters of GetTexParameteriv and GetTexParameterfv:

|TEXTURE_RESIDENT_EXT |0x8067| |:---------------------------------|:-----|

Accepted by the

<pname>

parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev:

|TEXTURE_1D_BINDING_EXT |0x8068| |:----------------------------------|:-----| |TEXTURE_2D_BINDING_EXT |0x8069| |TEXTURE_3D_BINDING_EXT |0x806A|

Errors

INVALID_VALUE is generated if GenTexturesEXT parameter

<n>

is negative.

INVALID_VALUE is generated if DeleteTexturesEXT parameter

<n>

is negative.

INVALID_ENUM is generated if BindTextureEXT parameter

<target>

is not TEXTURE_1D, TEXTURE_2D, or TEXTURE_3D_EXT.

INVALID_OPERATION is generated if BindTextureEXT parameter

<target>

is TEXTURE_1D, and parameter

<texture>

is the name of a 2-dimensional or 3-dimensional texture object.

INVALID_OPERATION is generated if BindTextureEXT parameter

<target>

is TEXTURE_2D, and parameter

<texture>

is the name of a 1-dimensional or 3-dimensional texture object.

INVALID_OPERATION is generated if BindTextureEXT parameter

<target>

is TEXTURE_3D_EXT, and parameter

<texture>

is the name of a 1-dimensional or 2-dimensional texture object.

INVALID_VALUE is generated if PrioritizeTexturesEXT parameter

<n>

negative.

INVALID_VALUE is generated if AreTexturesResidentEXT parameter

<n>

is negative.

INVALID_VALUE is generated by AreTexturesResidentEXT if any of the names in

<textures>

is zero, or is not the name of a texture.

INVALID_OPERATION is generated if any of the commands defined in this extension is executed between the execution of Begin and the corresponding execution of End.

New State

| Get Value | Get Command | Type | Initial Value | |:--------------|:----------------|:---------|:------------------| |TEXTURE_1D |IsEnabled |B |FALSE | |TEXTURE_2D |IsEnabled |B | FALSE | |TEXTURE_3D_EXT |IsEnabled |B | FALSE | |TEXTURE_1D_BINDING_EXT|GetIntegerv |Z+ | 0 | |TEXTURE_2D_BINDING_EXT|GetIntegerv | Z+ | 0 | |TEXTURE_3D_BINDING_EXT|GetIntegerv | Z+ | 0 | |TEXTURE_PRIORITY_EXT|GetTexParameterfv | n x Z+ |1 | |TEXTURE_RESIDENT_EXT|AreTexturesResidentEXT|n x B | unknown | |TEXTURE |GetTexImage |n x levels x I| null | |TEXTURE_RED_SIZE_EXT|GetTexLevelParameteriv |n x levels x Z+| 0 | |TEXTURE_GREEN_SIZE_EXT|GetTexLevelParameteriv | n x levels x Z+ | 0 | |TEXTURE_BLUE_SIZE_EXT|GetTexLevelParameteriv | n x levels x Z+ | 0 | |TEXTURE_ALPHA_SIZE_EXT|GetTexLevelParameteriv | n x levels x Z+ | 0 | |TEXTURE_LUMINANCE_SIZE_EXT|GetTexLevelParameteriv | n x levels x Z+ | 0 | |TEXTURE_INTENSITY_SIZE_EXT|GetTexLevelParameteriv | n x levels x Z+ | 0 | |TEXTURE_WIDTH |GetTexLevelParameteriv | n x levels x Z+|0 | |TEXTURE_HEIGHT|GetTexLevelParameteriv | n x levels x Z+ |0 | |TEXTURE_DEPTH_EXT|GetTexLevelParameteriv | n x levels x Z+ | 0 | |TEXTURE_4DSIZE_SGIS|GetTexLevelParameteriv |n x levels x Z+ |0 | |TEXTURE_BORDER |GetTexLevelParameteriv | n x levels x Z+| 0 | |TEXTURE_COMPONENTS (1D and 2D)|GetTexLevelParameteriv | n x levels x Z42| 1 | |TEXTURE_COMPONENTS (3D and 4D)|GetTexLevelParameteriv| n x levels x Z38|LUMINANCE | |TEXTURE_BORDER_COLOR |GetTexParameteriv |n x C | 0, 0, 0, 0 | |TEXTURE_MIN_FILTER|GetTexParameteriv |n x Z7 | NEAREST_MIPMAP_LINEAR| |TEXTURE_MAG_FILTER|GetTexParameteriv |n x Z3 | LINEAR | |TEXTURE_WRAP_S|GetTexParameteriv |n x Z2 | REPEAT | |TEXTURE_WRAP_T|GetTexParameteriv |n x Z2 | REPEAT | |TEXTURE_WRAP_R_EXT|GetTexParameteriv | n x Z2 | REPEAT | |TEXTURE_WRAP_Q_SGIS|GetTexParameteriv |n x Z2 | REPEAT |

New Implementation Dependent State

None