Top Description Fields Constructors Methods
org.lwjgl.opengl

public final Class ARBTextureSwizzle

extends Object
Class Inheritance

Native bindings to the ARB_texture_swizzle extension.

Classic OpenGL texture formats conflate texture storage and interpretation, and assume that textures represent color. In modern applications, a significant quantity of textures don't represent color, but rather data like shadow maps, normal maps, page tables, occlusion data, etc. For the latter class of data, calling the data "RGBA" is just a convenient mapping of what the data is onto the current model, but isn't an accurate reflection of the reality of the data.

The existing texture formats provide an almost orthogonal set of data types, sizes, and number of components, but the mappings of this storage into what the shader or fixed-function pipeline fetches is very much non-orthogonal. Previous extensions have added some of the most demanded missing formats, but the problem has not been solved once and for all.

This extension provides a mechanism to swizzle the components of a texture before they are applied according to the texture environment in fixed-function or as they are returned to the shader.

Promoted to core in OpenGL 3.3.

Field Summary

Modifier and TypeField and Description
public static final int
GL_TEXTURE_SWIZZLE_A

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

public static final int
GL_TEXTURE_SWIZZLE_B

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

public static final int
GL_TEXTURE_SWIZZLE_G

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

public static final int
GL_TEXTURE_SWIZZLE_R

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

public static final int
GL_TEXTURE_SWIZZLE_RGBA

Accepted by the pname parameters of TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_TEXTURE_SWIZZLE_Aback to summary
public static final int GL_TEXTURE_SWIZZLE_A

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

GL_TEXTURE_SWIZZLE_Bback to summary
public static final int GL_TEXTURE_SWIZZLE_B

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

GL_TEXTURE_SWIZZLE_Gback to summary
public static final int GL_TEXTURE_SWIZZLE_G

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

GL_TEXTURE_SWIZZLE_Rback to summary
public static final int GL_TEXTURE_SWIZZLE_R

Accepted by the pname parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

GL_TEXTURE_SWIZZLE_RGBAback to summary
public static final int GL_TEXTURE_SWIZZLE_RGBA

Accepted by the pname parameters of TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

Constructor Detail

ARBTextureSwizzleback to summary
private ARBTextureSwizzle()