Class NVTextureShader
- java.lang.Object
-
- org.lwjgl.opengl.NVTextureShader
-
public final class NVTextureShader extends java.lang.Object
Native bindings to the NV_texture_shader extension.Standard OpenGL and the ARB_multitexture extension define a straightforward direct mechanism for mapping sets of texture coordinates to filtered colors. This extension provides a more functional mechanism.
OpenGL's standard texturing mechanism defines a set of texture targets. Each texture target defines how the texture image is specified and accessed via a set of texture coordinates. OpenGL 1.0 defines the 1D and 2D texture targets. OpenGL 1.2 (and/or the EXT_texture3D extension) defines the 3D texture target. The ARB_texture_cube_map extension defines the cube map texture target. Each texture unit's texture coordinate set is mapped to a color using the unit's highest priority enabled texture target.
This extension introduces texture shader stages. A sequence of texture shader stages provides a more flexible mechanism for mapping sets of texture coordinates to texture unit RGBA results than standard OpenGL.
When the texture shader enable is on, the extension replaces the conventional OpenGL mechanism for mapping sets of texture coordinates to filtered colors with this extension's sequence of texture shader stages.
Each texture shader stage runs one of 21 canned texture shader programs. These programs support conventional OpenGL texture mapping but also support dependent texture accesses, dot product texture programs, and special modes. (3D texture mapping texture shader operations are NOT provided by this extension; 3D texture mapping texture shader operations are added by the NV_texture_shader2 extension that is layered on this extension. See the NV_texture_shader2 specification.)
To facilitate the new texture shader programs, this extension introduces several new texture formats and variations on existing formats. Existing color texture formats are extended by introducing new signed variants. Two new types of texture formats (beyond colors) are also introduced. Texture offset groups encode two signed offsets, and optionally a magnitude or a magnitude and an intensity. The new HILO (pronounced high-low) formats provide possibly signed, high precision (16-bit) two-component textures.
Each program takes as input the stage's interpolated texture coordinate set (s,t,r,q). Each program generates two results: a shader stage result that may be used as an input to subsequent shader stage programs, and a texture unit RGBA result that becomes the texture color used by the texture unit's texture environment function or becomes the initial value for the corresponding texture register for register combiners. The texture unit RGBA result is always an RGBA color, but the shader stage result may be one of an RGBA color, a HILO value, a texture offset group, a floating-point value, or an invalid result. When both results are RGBA colors, the shader stage result and the texture unit RGBA result are usually identical (though not in all cases).
Additionally, certain programs have a side-effect such as culling the fragment or replacing the fragment's depth value.
Requires
ARB_multitexture
andARB_texture_cube_map
.
-
-
Field Summary
Fields Modifier and Type Field Description static int
GL_CONST_EYE_NV
When thetarget
parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_CULL_FRAGMENT_NV
When thetarget
andpname
parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV respectively, then the value ofparam
or the value pointed to byparams
may be.static int
GL_CULL_MODES_NV
When thetarget
parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_DEPENDENT_AR_TEXTURE_2D_NV
GL_DEPENDENT_GB_TEXTURE_2D_NV
GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV
GL_DOT_PRODUCT_DEPTH_REPLACE_NV
GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV
GL_DOT_PRODUCT_NV
GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV
GL_DOT_PRODUCT_TEXTURE_2D_NV
GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV
GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NVWhen thetarget
andpname
parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV respectively, then the value ofparam
or the value pointed to byparams
may be.static int
GL_DS_BIAS_NV
GL_DS_SCALE_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.static int
GL_DSDT_MAG_INTENSITY_NV
Accepted by theinternalformat
parameter of TexImage1D and TexImage2D.static int
GL_DSDT_MAG_NV
GL_DSDT_MAG_VIB_NV
GL_DSDT_NVAccepted by theformat
parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D.static int
GL_DSDT8_MAG8_INTENSITY8_NV
GL_DSDT8_MAG8_NV
GL_DSDT8_NVAccepted by theinternalformat
parameter of TexImage1D and TexImage2D.static int
GL_DT_BIAS_NV
GL_DT_SCALE_NV
GL_HI_BIAS_NV
GL_HI_SCALE_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.static int
GL_HILO_NV
Accepted by theformat
parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D.static int
GL_HILO16_NV
Accepted by theinternalformat
parameter of TexImage1D and TexImage2D.static int
GL_LO_BIAS_NV
GL_LO_SCALE_NV
GL_MAGNITUDE_BIAS_NV
GL_MAGNITUDE_SCALE_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.static int
GL_OFFSET_TEXTURE_2D_NV
When thetarget
andpname
parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV respectively, then the value ofparam
or the value pointed to byparams
may be.static int
GL_OFFSET_TEXTURE_BIAS_NV
When thetarget
parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_OFFSET_TEXTURE_MATRIX_NV
When thetarget
parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_OFFSET_TEXTURE_RECTANGLE_NV
GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NVWhen thetarget
andpname
parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV respectively, then the value ofparam
or the value pointed to byparams
may be.static int
GL_OFFSET_TEXTURE_SCALE_NV
When thetarget
parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_PASS_THROUGH_NV
When thetarget
andpname
parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV respectively, then the value ofparam
or the value pointed to byparams
may be.static int
GL_PREVIOUS_TEXTURE_INPUT_NV
GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NVWhen thetarget
parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_SHADER_CONSISTENT_NV
When thetarget
parameter GetTexEnvfv and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_SHADER_OPERATION_NV
When thetarget
parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.static int
GL_SIGNED_ALPHA_NV
GL_SIGNED_ALPHA8_NVAccepted by theinternalformat
parameter of CopyTexImage1D, CopyTexImage2D, TexImage1D, and TexImage2D.static int
GL_SIGNED_HILO_NV
GL_SIGNED_HILO16_NVAccepted by theinternalformat
parameter of TexImage1D and TexImage2D.static int
GL_SIGNED_INTENSITY_NV
GL_SIGNED_INTENSITY8_NV
GL_SIGNED_LUMINANCE_ALPHA_NV
GL_SIGNED_LUMINANCE_NV
GL_SIGNED_LUMINANCE8_ALPHA8_NV
GL_SIGNED_LUMINANCE8_NV
GL_SIGNED_RGB_NV
GL_SIGNED_RGB_UNSIGNED_ALPHA_NV
GL_SIGNED_RGB8_NV
GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV
GL_SIGNED_RGBA_NV
GL_SIGNED_RGBA8_NVAccepted by theinternalformat
parameter of CopyTexImage1D, CopyTexImage2D, TexImage1D, and TexImage2D.static int
GL_TEXTURE_BORDER_VALUES_NV
Accepted by thepname
parameter of TexParameteriv, TexParameterfv, GetTexParameterfv and GetTexParameteriv.static int
GL_TEXTURE_DS_SIZE_NV
GL_TEXTURE_DT_SIZE_NV
GL_TEXTURE_HI_SIZE_NV
GL_TEXTURE_LO_SIZE_NV
GL_TEXTURE_MAG_SIZE_NVAccepted by thepname
parameter of GetTexLevelParameterfv and GetTexLevelParameteriv.static int
GL_TEXTURE_SHADER_NV
Accepted by thecap
parameter of Enable, Disable, and IsEnabled, and by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, and by thetarget
parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv.static int
GL_UNSIGNED_INT_8_8_S8_S8_REV_NV
GL_UNSIGNED_INT_S8_S8_8_8_NVAccepted by thetype
parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D.static int
GL_VIBRANCE_BIAS_NV
GL_VIBRANCE_SCALE_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.
-
-
-
Field Detail
-
GL_TEXTURE_SHADER_NV
Accepted by thecap
parameter of Enable, Disable, and IsEnabled, and by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, and by thetarget
parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv.
-
GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_SCALE_NV, GL_OFFSET_TEXTURE_BIAS_NV, GL_PREVIOUS_TEXTURE_INPUT_NV
When thetarget
parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.
-
GL_CULL_MODES_NV, GL_OFFSET_TEXTURE_MATRIX_NV, GL_CONST_EYE_NV
When thetarget
parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.
-
GL_SHADER_CONSISTENT_NV
When thetarget
parameter GetTexEnvfv and GetTexEnviv is TEXTURE_SHADER_NV, then the value ofpname
may be.
-
GL_PASS_THROUGH_NV, GL_CULL_FRAGMENT_NV, GL_OFFSET_TEXTURE_2D_NV, GL_OFFSET_TEXTURE_RECTANGLE_NV, GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV, GL_DEPENDENT_AR_TEXTURE_2D_NV, GL_DEPENDENT_GB_TEXTURE_2D_NV, GL_DOT_PRODUCT_NV, GL_DOT_PRODUCT_DEPTH_REPLACE_NV, GL_DOT_PRODUCT_TEXTURE_2D_NV, GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV, GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV, GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV
When thetarget
andpname
parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV respectively, then the value ofparam
or the value pointed to byparams
may be.
-
GL_HILO_NV, GL_DSDT_NV, GL_DSDT_MAG_NV, GL_DSDT_MAG_VIB_NV
Accepted by theformat
parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D.
-
GL_UNSIGNED_INT_S8_S8_8_8_NV, GL_UNSIGNED_INT_8_8_S8_S8_REV_NV
Accepted by thetype
parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D.
-
GL_SIGNED_RGBA_NV, GL_SIGNED_RGBA8_NV, GL_SIGNED_RGB_NV, GL_SIGNED_RGB8_NV, GL_SIGNED_LUMINANCE_NV, GL_SIGNED_LUMINANCE8_NV, GL_SIGNED_LUMINANCE_ALPHA_NV, GL_SIGNED_LUMINANCE8_ALPHA8_NV, GL_SIGNED_ALPHA_NV, GL_SIGNED_ALPHA8_NV, GL_SIGNED_INTENSITY_NV, GL_SIGNED_INTENSITY8_NV, GL_SIGNED_RGB_UNSIGNED_ALPHA_NV, GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV
Accepted by theinternalformat
parameter of CopyTexImage1D, CopyTexImage2D, TexImage1D, and TexImage2D.
-
GL_HILO16_NV, GL_SIGNED_HILO_NV, GL_SIGNED_HILO16_NV, GL_DSDT8_NV, GL_DSDT8_MAG8_NV, GL_DSDT_MAG_INTENSITY_NV, GL_DSDT8_MAG8_INTENSITY8_NV
Accepted by theinternalformat
parameter of TexImage1D and TexImage2D.
-
GL_HI_SCALE_NV, GL_LO_SCALE_NV, GL_DS_SCALE_NV, GL_DT_SCALE_NV, GL_MAGNITUDE_SCALE_NV, GL_VIBRANCE_SCALE_NV, GL_HI_BIAS_NV, GL_LO_BIAS_NV, GL_DS_BIAS_NV, GL_DT_BIAS_NV, GL_MAGNITUDE_BIAS_NV, GL_VIBRANCE_BIAS_NV
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.
-
GL_TEXTURE_BORDER_VALUES_NV
Accepted by thepname
parameter of TexParameteriv, TexParameterfv, GetTexParameterfv and GetTexParameteriv.
-
GL_TEXTURE_HI_SIZE_NV, GL_TEXTURE_LO_SIZE_NV, GL_TEXTURE_DS_SIZE_NV, GL_TEXTURE_DT_SIZE_NV, GL_TEXTURE_MAG_SIZE_NV
Accepted by thepname
parameter of GetTexLevelParameterfv and GetTexLevelParameteriv.
-
-