public class ARBViewportArray
extends java.lang.Object
OpenGL is modeled on a pipeline of operations. The final stage in this pipeline before rasterization is the viewport transformation. This stage transforms vertices from view space into window coordinates and allows the application to specify a rectangular region of screen space into which OpenGL should draw primitives. Unextended OpenGL implementations provide a single viewport per context. In order to draw primitives into multiple viewports, the OpenGL viewport may be changed between several draw calls. With the advent of Geometry Shaders, it has become possible for an application to amplify geometry and produce multiple output primitives for each primitive input to the Geometry Shader. It is possible to direct these primitives to render into a selected render target. However, all render targets share the same, global OpenGL viewport.
This extension enhances OpenGL by providing a mechanism to expose multiple viewports. Each viewport is specified as a rectangle. The destination viewport may be selected per-primitive by the geometry shader. This allows the Geometry Shader to produce different versions of primitives destined for separate viewport rectangles on the same surface. Additionally, when combined with multiple framebuffer attachments, it allows a different viewport rectangle to be selected for each. This extension also exposes a separate scissor rectangle for each viewport. Finally, the viewport bounds are now floating point quantities allowing fractional pixel offsets to be applied during the viewport transform.
Requires OpenGL 3.2 or EXT_geometry_shader4 or ARB_geometry_shader4. Promoted to core in OpenGL 4.1.
| Modifier and Type | Field and Description |
|---|---|
static int |
GL_LAYER_PROVOKING_VERTEX
Accepted by the
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. |
static int |
GL_MAX_VIEWPORTS
Accepted by the
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. |
static int |
GL_UNDEFINED_VERTEX
Returned in the
data parameter from a Get query with a pname of LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX. |
static int |
GL_VIEWPORT_BOUNDS_RANGE
Accepted by the
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. |
static int |
GL_VIEWPORT_INDEX_PROVOKING_VERTEX
Accepted by the
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. |
static int |
GL_VIEWPORT_SUBPIXEL_BITS
Accepted by the
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. |
| Modifier and Type | Method and Description |
|---|---|
static void |
glDepthRangeArrayv(int first,
double[] v)
Array version of:
DepthRangeArrayv |
static void |
glDepthRangeArrayv(int first,
java.nio.DoubleBuffer v)
Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified set of viewports.
|
static void |
glDepthRangeIndexed(int index,
double zNear,
double zFar)
Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified viewport.
|
static void |
glGetDoublei_v(int target,
int index,
double[] data)
Array version of:
GetDoublei_v |
static void |
glGetDoublei_v(int target,
int index,
java.nio.DoubleBuffer data)
Queries the double value of an indexed state variable.
|
static double |
glGetDoublei(int target,
int index)
Queries the double value of an indexed state variable.
|
static void |
glGetFloati_v(int target,
int index,
float[] data)
Array version of:
GetFloati_v |
static void |
glGetFloati_v(int target,
int index,
java.nio.FloatBuffer data)
Queries the float value of an indexed state variable.
|
static float |
glGetFloati(int target,
int index)
Queries the float value of an indexed state variable.
|
static void |
glScissorArrayv(int first,
int[] v)
Array version of:
ScissorArrayv |
static void |
glScissorArrayv(int first,
java.nio.IntBuffer v)
Defines the scissor box for multiple viewports.
|
static void |
glScissorIndexed(int index,
int left,
int bottom,
int width,
int height)
Defines the scissor box for a specific viewport.
|
static void |
glScissorIndexedv(int index,
int[] v)
Array version of:
ScissorIndexedv |
static void |
glScissorIndexedv(int index,
java.nio.IntBuffer v)
Pointer version of
ScissorIndexed. |
static void |
glViewportArrayv(int first,
float[] v)
Array version of:
ViewportArrayv |
static void |
glViewportArrayv(int first,
java.nio.FloatBuffer v)
Sets multiple viewports.
|
static void |
glViewportIndexedf(int index,
float x,
float y,
float w,
float h)
Sets a specified viewport.
|
static void |
glViewportIndexedfv(int index,
float[] v)
Array version of:
ViewportIndexedfv |
static void |
glViewportIndexedfv(int index,
java.nio.FloatBuffer v)
Pointer version of
ViewportIndexedf. |
static void |
nglDepthRangeArrayv(int first,
int count,
long v)
Unsafe version of:
DepthRangeArrayv |
static void |
nglGetDoublei_v(int target,
int index,
long data)
Unsafe version of:
GetDoublei_v |
static void |
nglGetFloati_v(int target,
int index,
long data)
Unsafe version of:
GetFloati_v |
static void |
nglScissorArrayv(int first,
int count,
long v)
Unsafe version of:
ScissorArrayv |
static void |
nglScissorIndexedv(int index,
long v)
Unsafe version of:
ScissorIndexedv |
static void |
nglViewportArrayv(int first,
int count,
long v)
Unsafe version of:
ViewportArrayv |
static void |
nglViewportIndexedfv(int index,
long v)
Unsafe version of:
ViewportIndexedfv |
public static final int GL_MAX_VIEWPORTS
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.public static final int GL_VIEWPORT_SUBPIXEL_BITS
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.public static final int GL_VIEWPORT_BOUNDS_RANGE
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.public static final int GL_LAYER_PROVOKING_VERTEX
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.public static final int GL_VIEWPORT_INDEX_PROVOKING_VERTEX
pname parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.public static final int GL_UNDEFINED_VERTEX
data parameter from a Get query with a pname of LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX.public static void nglViewportArrayv(int first,
int count,
long v)
ViewportArrayvcount - the number of viewports to setpublic static void glViewportArrayv(int first,
java.nio.FloatBuffer v)
first - the first viewport to setv - an array containing the viewport parameterspublic static void glViewportIndexedf(int index,
float x,
float y,
float w,
float h)
index - the viewport to setx - the left viewport coordinatey - the bottom viewport coordinatew - the viewport widthh - the viewport heightpublic static void nglViewportIndexedfv(int index,
long v)
ViewportIndexedfvpublic static void glViewportIndexedfv(int index,
java.nio.FloatBuffer v)
ViewportIndexedf.index - the viewport to setv - the viewport parameterspublic static void nglScissorArrayv(int first,
int count,
long v)
ScissorArrayvcount - the number of scissor boxes to modifypublic static void glScissorArrayv(int first,
java.nio.IntBuffer v)
first - the index of the first viewport whose scissor box to modifyv - an array containing the left, bottom, width and height of each scissor box, in that orderpublic static void glScissorIndexed(int index,
int left,
int bottom,
int width,
int height)
index - the index of the viewport whose scissor box to modifyleft - the left scissor box coordinatebottom - the bottom scissor box coordinatewidth - the scissor box widthheight - the scissor box heightpublic static void nglScissorIndexedv(int index,
long v)
ScissorIndexedvpublic static void glScissorIndexedv(int index,
java.nio.IntBuffer v)
ScissorIndexed.index - the index of the viewport whose scissor box to modifyv - an array containing the left, bottom, width and height of each scissor box, in that orderpublic static void nglDepthRangeArrayv(int first,
int count,
long v)
DepthRangeArrayvcount - the number of viewports whose depth range to updatepublic static void glDepthRangeArrayv(int first,
java.nio.DoubleBuffer v)
first - the index of the first viewport whose depth range to updatev - n array containing the near and far values for the depth range of each modified viewportpublic static void glDepthRangeIndexed(int index,
double zNear,
double zFar)
index - the index of the viewport whose depth range to updatezNear - the mapping of the near clipping plane to window coordinates. The initial value is 0.zFar - the mapping of the far clipping plane to window coordinates. The initial value is 1.public static void nglGetFloati_v(int target,
int index,
long data)
GetFloati_vpublic static void glGetFloati_v(int target,
int index,
java.nio.FloatBuffer data)
target - the indexed state to queryindex - the index of the element being querieddata - a scalar or buffer in which to place the returned datapublic static float glGetFloati(int target,
int index)
target - the indexed state to queryindex - the index of the element being queriedpublic static void nglGetDoublei_v(int target,
int index,
long data)
GetDoublei_vpublic static void glGetDoublei_v(int target,
int index,
java.nio.DoubleBuffer data)
target - the indexed state to queryindex - the index of the element being querieddata - a scalar or buffer in which to place the returned datapublic static double glGetDoublei(int target,
int index)
target - the indexed state to queryindex - the index of the element being queriedpublic static void glViewportArrayv(int first,
float[] v)
ViewportArrayvpublic static void glViewportIndexedfv(int index,
float[] v)
ViewportIndexedfvpublic static void glScissorArrayv(int first,
int[] v)
ScissorArrayvpublic static void glScissorIndexedv(int index,
int[] v)
ScissorIndexedvpublic static void glDepthRangeArrayv(int first,
double[] v)
DepthRangeArrayvpublic static void glGetFloati_v(int target,
int index,
float[] data)
GetFloati_vpublic static void glGetDoublei_v(int target,
int index,
double[] data)
GetDoublei_vCopyright LWJGL. All Rights Reserved. License terms.