Class ARBViewportArray


  • public class ARBViewportArray
    extends java.lang.Object
    Native bindings to the ARB_viewport_array extension.

    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.

    • Method Detail

      • nglViewportArrayv

        public static void nglViewportArrayv​(int first,
                                             int count,
                                             long v)
        Unsafe version of: ViewportArrayv
        Parameters:
        count - the number of viewports to set
      • glViewportArrayv

        public static void glViewportArrayv​(int first,
                                            java.nio.FloatBuffer v)
        Sets multiple viewports.
        Parameters:
        first - the first viewport to set
        v - an array containing the viewport parameters
      • glViewportIndexedf

        public static void glViewportIndexedf​(int index,
                                              float x,
                                              float y,
                                              float w,
                                              float h)
        Sets a specified viewport.
        Parameters:
        index - the viewport to set
        x - the left viewport coordinate
        y - the bottom viewport coordinate
        w - the viewport width
        h - the viewport height
      • nglViewportIndexedfv

        public static void nglViewportIndexedfv​(int index,
                                                long v)
        Unsafe version of: ViewportIndexedfv
      • glViewportIndexedfv

        public static void glViewportIndexedfv​(int index,
                                               java.nio.FloatBuffer v)
        Pointer version of ViewportIndexedf.
        Parameters:
        index - the viewport to set
        v - the viewport parameters
      • nglScissorArrayv

        public static void nglScissorArrayv​(int first,
                                            int count,
                                            long v)
        Unsafe version of: ScissorArrayv
        Parameters:
        count - the number of scissor boxes to modify
      • glScissorArrayv

        public static void glScissorArrayv​(int first,
                                           java.nio.IntBuffer v)
        Defines the scissor box for multiple viewports.
        Parameters:
        first - the index of the first viewport whose scissor box to modify
        v - an array containing the left, bottom, width and height of each scissor box, in that order
      • glScissorIndexed

        public static void glScissorIndexed​(int index,
                                            int left,
                                            int bottom,
                                            int width,
                                            int height)
        Defines the scissor box for a specific viewport.
        Parameters:
        index - the index of the viewport whose scissor box to modify
        left - the left scissor box coordinate
        bottom - the bottom scissor box coordinate
        width - the scissor box width
        height - the scissor box height
      • nglScissorIndexedv

        public static void nglScissorIndexedv​(int index,
                                              long v)
        Unsafe version of: ScissorIndexedv
      • glScissorIndexedv

        public static void glScissorIndexedv​(int index,
                                             java.nio.IntBuffer v)
        Pointer version of ScissorIndexed.
        Parameters:
        index - the index of the viewport whose scissor box to modify
        v - an array containing the left, bottom, width and height of each scissor box, in that order
      • nglDepthRangeArrayv

        public static void nglDepthRangeArrayv​(int first,
                                               int count,
                                               long v)
        Unsafe version of: DepthRangeArrayv
        Parameters:
        count - the number of viewports whose depth range to update
      • glDepthRangeArrayv

        public 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.
        Parameters:
        first - the index of the first viewport whose depth range to update
        v - n array containing the near and far values for the depth range of each modified viewport
      • glDepthRangeIndexed

        public 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.
        Parameters:
        index - the index of the viewport whose depth range to update
        zNear - 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.
      • nglGetFloati_v

        public static void nglGetFloati_v​(int target,
                                          int index,
                                          long data)
        Unsafe version of: GetFloati_v
      • glGetFloati_v

        public static void glGetFloati_v​(int target,
                                         int index,
                                         java.nio.FloatBuffer data)
        Queries the float value of an indexed state variable.
        Parameters:
        target - the indexed state to query
        index - the index of the element being queried
        data - a scalar or buffer in which to place the returned data
      • glGetFloati

        public static float glGetFloati​(int target,
                                        int index)
        Queries the float value of an indexed state variable.
        Parameters:
        target - the indexed state to query
        index - the index of the element being queried
      • nglGetDoublei_v

        public static void nglGetDoublei_v​(int target,
                                           int index,
                                           long data)
        Unsafe version of: GetDoublei_v
      • glGetDoublei_v

        public static void glGetDoublei_v​(int target,
                                          int index,
                                          java.nio.DoubleBuffer data)
        Queries the double value of an indexed state variable.
        Parameters:
        target - the indexed state to query
        index - the index of the element being queried
        data - a scalar or buffer in which to place the returned data
      • glGetDoublei

        public static double glGetDoublei​(int target,
                                          int index)
        Queries the double value of an indexed state variable.
        Parameters:
        target - the indexed state to query
        index - the index of the element being queried
      • glViewportArrayv

        public static void glViewportArrayv​(int first,
                                            float[] v)
        Array version of: ViewportArrayv
      • glViewportIndexedfv

        public static void glViewportIndexedfv​(int index,
                                               float[] v)
        Array version of: ViewportIndexedfv
      • glScissorArrayv

        public static void glScissorArrayv​(int first,
                                           int[] v)
        Array version of: ScissorArrayv
      • glScissorIndexedv

        public static void glScissorIndexedv​(int index,
                                             int[] v)
        Array version of: ScissorIndexedv
      • glDepthRangeArrayv

        public static void glDepthRangeArrayv​(int first,
                                              double[] v)
        Array version of: DepthRangeArrayv
      • glGetFloati_v

        public static void glGetFloati_v​(int target,
                                         int index,
                                         float[] data)
        Array version of: GetFloati_v
      • glGetDoublei_v

        public static void glGetDoublei_v​(int target,
                                          int index,
                                          double[] data)
        Array version of: GetDoublei_v