Class NVViewportSwizzle
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 TypeFieldDescriptionstatic final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.static final int
Accepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.static final int
Accepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.static final int
Accepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.static final int
Accepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
glViewportSwizzleNV
(int index, int swizzlex, int swizzley, int swizzlez, int swizzlew) Sets the swizzle state for the specified viewport.
-
Field Details
-
GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_X_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV
public static final int GL_VIEWPORT_SWIZZLE_POSITIVE_W_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV
public static final int GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NVAccepted by theswizzlex
,swizzley
,swizzlez
, andswizzlew
parameters of ViewportSwizzleNV.- See Also:
-
GL_VIEWPORT_SWIZZLE_X_NV
public static final int GL_VIEWPORT_SWIZZLE_X_NVAccepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.- See Also:
-
GL_VIEWPORT_SWIZZLE_Y_NV
public static final int GL_VIEWPORT_SWIZZLE_Y_NVAccepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.- See Also:
-
GL_VIEWPORT_SWIZZLE_Z_NV
public static final int GL_VIEWPORT_SWIZZLE_Z_NVAccepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.- See Also:
-
GL_VIEWPORT_SWIZZLE_W_NV
public static final int GL_VIEWPORT_SWIZZLE_W_NVAccepted by thepname
parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v.- See Also:
-
-
Method Details
-
glViewportSwizzleNV
public static void glViewportSwizzleNV(int index, int swizzlex, int swizzley, int swizzlez, int swizzlew) Sets the swizzle state for the specified viewport.- Parameters:
index
- the viewport indexswizzlex
- the x swizzle state. One of:swizzley
- the y swizzle state. One of:swizzlez
- the z swizzle state. One of:swizzlew
- the w swizzle state. One of:
-