Contents
- Dependencies
- Overview
- New Procedures and Functions
- New Tokens
- Errors
- New Implementation Dependent State
Dependencies
OpenGL 1.1 is required. This extension is written against the OpenGL 1.3 Specification.
Overview
This is a clarification of the GL_SGIX_depth_texture extension. The original overview follows:
This extension defines a new depth texture format. An important application of depth texture images is shadow casting, but separating this from the shadow extension allows for the potential use of depth textures in other applications such as image-based rendering or displacement mapping. This extension does not define new depth-texture environment functions, such as filtering or applying the depth values computed from a texture but leaves this to other extensions, such as the shadow extension.
New Procedures and Functions
None
New Tokens
Accepted by the
<internalFormat>
parameter of TexImage1D, TexImage2D, CopyTexImage1D and CopyTexImage2D:
|DEPTH_COMPONENT | | |:----------------|:| |DEPTH_COMPONENT16_ARB | 0x81A5 (same as DEPTH_COMPONENT16_SGIX)| |DEPTH_COMPONENT24_ARB | 0x81A6 (same as DEPTH_COMPONENT24_SGIX)| |DEPTH_COMPONENT32_ARB | 0x81A7 (same as DEPTH_COMPONENT32_SGIX)|
Accepted by the
<format>
parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D:
|DEPTH_COMPONENT| |:---------------|
Accepted by the
<pname>
parameter of GetTexLevelParameterfv and GetTexLevelParameteriv:
|TEXTURE_DEPTH_SIZE_ARB | 0x884A| |:-----------------------------|:------|
Accepted by the
<pname>
parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv:
|DEPTH_TEXTURE_MODE_ARB | 0x884B| |:---------------------------|:--------|
Errors
INVALID_OPERATION is generated by TexImage2D or CopyTexImage2D if
<target>
is not TEXTURE_2D or PROXY_TEXTURE_2D and
<internalFormat>
is DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB.
INVALID_OPERATION is generated by TexImage1D or CopyTexImage1D if
<target>
is not TEXTURE_1D or PROXY_TEXTURE_1D and
<internalFormat>
is DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB.
INVALID_OPERATION is generated by TexImage1D or TexImage2D if
<format>
is DEPTH_COMPONENT and
<internalFormat>
is not DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB.
INVALID_OPERATION is generated by TexImage1D or TexImage2D if
<internalFormat>
is DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB, and
<format>
is not DEPTH_COMPONENT.
INVALID_OPERATION is generated by TexSubImage1D or TexSubImage2D if
<format>
is DEPTH_COMPONENT and the base internal format of the texture is not DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB.
INVALID_OPERATION is generated by TexSubImage1D or TexSubImage2D if
<format>
is not DEPTH_COMPONENT and the base internal format of the texture is DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB.
INVALID_OPERATION is generated by TexImage3D if
<internalFormat>
is DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB.
INVALID_OPERATION is generated by CopyTexImage1D or CopyTexImage2D if
<internalFormat>
is DEPTH_COMPONENT, DEPTH_COMPONENT16_ARB, DEPTH_COMPONENT24_ARB, or DEPTH_COMPONENT32_ARB, and there is no depth buffer.
INVALID_OPERATION is generated by CopyTexSubImage1D or CopyTexSubImage2D if the base internal format of the texture is DEPTH_COMPONENT and there is no depth buffer.
INVALID_ENUM is generated if TexParameterif parameter
<pname>
is DEPTH_TEXTURE_MODE_ARB and parameter
<param>
is not ALPHA, LUMINANCE, or INTENSITY.
INVALID_OPERATION is generated if GetTexImage parameter
<format>
is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, BGR, BGRA, LUMINANCE, or LUMINANCE_ALPHA but the internal format of the texture level image is not a color format.
INVALID_OPERATION is generated if GetTexImage parameter
<format>
is DEPTH_COMPONENT but the internal format of the texture level image is not a depth format.
Eliminate the INVALID_ENUM generated if GetTexImage parameter
<format>
is DEPTH_COMPONENT. (but this should still be an error for GetColorTable, GetConvolutionFilter, GetSeparableFilter, GetHistogram, and GetMinmax).
New Implementation Dependent State
None