Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class NVViewportSwizzle

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

Native bindings to the NV_viewport_swizzle extension.

This extension provides a new per-viewport swizzle that can modify the position of primitives sent to each viewport. New viewport swizzle state is added for each viewport, and a new position vector is computed for each vertex by selecting from and optionally negating any of the four components of the original position vector.

This new viewport swizzle is useful for a number of algorithms, including single-pass cubemap rendering (broadcasting a primitive to multiple faces and reorienting the vertex position for each face) and voxel rasterization. The per-viewport component remapping and negation provided by the swizzle allows application code to re-orient three-dimensional geometry with a view along any of the X, Y, or Z axes. If a perspective projection and depth buffering is required, 1/W buffering should be used, as described in the single-pass cubemap rendering example in the "Issues" section below.

Field Summary

Modifier and TypeField and Description
public static final int
GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

public static final int
GL_VIEWPORT_SWIZZLE_W_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

public static final int
GL_VIEWPORT_SWIZZLE_X_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

public static final int
GL_VIEWPORT_SWIZZLE_Y_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

public static final int
GL_VIEWPORT_SWIZZLE_Z_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_POSITIVE_W_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_POSITIVE_X_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV

Accepted by the swizzlex, swizzley, swizzlez, and swizzlew parameters of ViewportSwizzleNV.

GL_VIEWPORT_SWIZZLE_W_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_W_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

GL_VIEWPORT_SWIZZLE_X_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_X_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

GL_VIEWPORT_SWIZZLE_Y_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_Y_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

GL_VIEWPORT_SWIZZLE_Z_NVback to summary
public static final int GL_VIEWPORT_SWIZZLE_Z_NV

Accepted by the pname parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.

Constructor Detail

NVViewportSwizzleback to summary
protected NVViewportSwizzle()

Method Detail

glViewportSwizzleNVback to summary
public static native void glViewportSwizzleNV(int index, int swizzlex, int swizzley, int swizzlez, int swizzlew)

Sets the swizzle state for the specified viewport.

Parameters
index:int

the viewport index

swizzlex:int

the x swizzle state. One of:

VIEWPORT_SWIZZLE_POSITIVE_X_NVVIEWPORT_SWIZZLE_NEGATIVE_X_NV
VIEWPORT_SWIZZLE_POSITIVE_Y_NVVIEWPORT_SWIZZLE_NEGATIVE_Y_NV
VIEWPORT_SWIZZLE_POSITIVE_Z_NVVIEWPORT_SWIZZLE_NEGATIVE_Z_NV
VIEWPORT_SWIZZLE_POSITIVE_W_NVVIEWPORT_SWIZZLE_NEGATIVE_W_NV
swizzley:int

the y swizzle state. One of:

VIEWPORT_SWIZZLE_POSITIVE_X_NVVIEWPORT_SWIZZLE_NEGATIVE_X_NV
VIEWPORT_SWIZZLE_POSITIVE_Y_NVVIEWPORT_SWIZZLE_NEGATIVE_Y_NV
VIEWPORT_SWIZZLE_POSITIVE_Z_NVVIEWPORT_SWIZZLE_NEGATIVE_Z_NV
VIEWPORT_SWIZZLE_POSITIVE_W_NVVIEWPORT_SWIZZLE_NEGATIVE_W_NV
swizzlez:int

the z swizzle state. One of:

VIEWPORT_SWIZZLE_POSITIVE_X_NVVIEWPORT_SWIZZLE_NEGATIVE_X_NV
VIEWPORT_SWIZZLE_POSITIVE_Y_NVVIEWPORT_SWIZZLE_NEGATIVE_Y_NV
VIEWPORT_SWIZZLE_POSITIVE_Z_NVVIEWPORT_SWIZZLE_NEGATIVE_Z_NV
VIEWPORT_SWIZZLE_POSITIVE_W_NVVIEWPORT_SWIZZLE_NEGATIVE_W_NV
swizzlew:int

the w swizzle state. One of:

VIEWPORT_SWIZZLE_POSITIVE_X_NVVIEWPORT_SWIZZLE_NEGATIVE_X_NV
VIEWPORT_SWIZZLE_POSITIVE_Y_NVVIEWPORT_SWIZZLE_NEGATIVE_Y_NV
VIEWPORT_SWIZZLE_POSITIVE_Z_NVVIEWPORT_SWIZZLE_NEGATIVE_Z_NV
VIEWPORT_SWIZZLE_POSITIVE_W_NVVIEWPORT_SWIZZLE_NEGATIVE_W_NV