Class EXTWindowRectangles
- java.lang.Object
-
- org.lwjgl.opengl.EXTWindowRectangles
-
public class EXTWindowRectangles extends java.lang.ObjectNative bindings to the EXT_window_rectangles extension.This extension provides additional orthogonally aligned "window rectangles" specified in window-space coordinates that restrict rasterization of all primitive types (geometry, images, paths) and framebuffer clears.
When rendering to the framebuffer of an on-screen window, these window rectangles are ignored so these window rectangles apply to rendering to non-zero framebuffer objects only.
From zero to an implementation-dependent limit (specified by
MAX_WINDOW_RECTANGLES_EXT) number of window rectangles can be operational at once. When one or more window rectangles are active, rasterized fragments can either survive if the fragment is within any of the operational window rectangles (INCLUSIVE_EXTmode) or be rejected if the fragment is within any of the operational window rectangles (EXCLUSIVE_EXTmode).These window rectangles operate orthogonally to the existing scissor test functionality.
This extension has specification language for both OpenGL and ES so
EXT_window_rectanglescan be implemented and advertised for either or both API contexts.Requires
GL30orEXT_draw_buffers2.
-
-
Field Summary
Fields Modifier and Type Field and Description static intGL_EXCLUSIVE_EXT
GL_INCLUSIVE_EXTAccepted by themodeparameter ofWindowRectanglesEXT.static intGL_MAX_WINDOW_RECTANGLES_EXT
GL_NUM_WINDOW_RECTANGLES_EXTAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static intGL_WINDOW_RECTANGLE_EXTAccepted by thepnameparameter of GetIntegeri_v, GetInteger64i_v, GetBooleani_v, GetFloati_v, GetDoublei_v, GetIntegerIndexedvEXT, GetFloatIndexedvEXT, GetDoubleIndexedvEXT, GetBooleanIndexedvEXT, and GetIntegeri_vEXT.static intGL_WINDOW_RECTANGLE_MODE_EXTAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidglWindowRectanglesEXT(int mode, int[] box)Array version of:WindowRectanglesEXTstatic voidglWindowRectanglesEXT(int mode, java.nio.IntBuffer box)Sets the active window rectangles.
-
-
-
Field Detail
-
GL_INCLUSIVE_EXT, GL_EXCLUSIVE_EXT
Accepted by themodeparameter ofWindowRectanglesEXT.
-
GL_WINDOW_RECTANGLE_EXT
Accepted by thepnameparameter of GetIntegeri_v, GetInteger64i_v, GetBooleani_v, GetFloati_v, GetDoublei_v, GetIntegerIndexedvEXT, GetFloatIndexedvEXT, GetDoubleIndexedvEXT, GetBooleanIndexedvEXT, and GetIntegeri_vEXT.
-
GL_WINDOW_RECTANGLE_MODE_EXT, GL_MAX_WINDOW_RECTANGLES_EXT, GL_NUM_WINDOW_RECTANGLES_EXT
Accepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.
-
-
Method Detail
-
glWindowRectanglesEXT
public static void glWindowRectanglesEXT(int mode, java.nio.IntBuffer box)Sets the active window rectangles.When the
WindowRectanglesEXTcommand is processed without error, the ith window rectangle box is set to the corresponding four parameters for values ofiless thenn. For values ofigreater thann, each window rectangle box is set to (0,0,0,0).Each four elements corresponds to the ith window rectangle indicating a box of pixels specified with window-space coordinates. Each window rectangle box
ihas a lower-left origin at(x_i,y_i)and upper-right corner at(x_i+w_i,y_i+h_i).The
INVALID_VALUEerror is generated if any elementw_iorh_i, corresponding to each box's respective width and height, is negative.Each rasterized or cleared fragment with a window-space position
(xw,yw)is within the ith window rectangle box when both of these equations are satisfied for alliless thann:x_i <= xw < x_i+w_i y_i <= yw < y_i+h_iWhen the window rectangles mode is
INCLUSIVE_EXTmode and the bound framebuffer object is non-zero, a fragment passes the window rectangles test if the fragment's window-space position is within at least one of the currentnactive window rectangles; otherwise the window rectangles test fails and the fragment is discarded.When the window rectangles mode is
EXCLUSIVE_EXTmode and the bound framebuffer object is non-zero, a fragment fails the window rectangles test and is discarded if the fragment's window-space position is within at least one of the currentnactive window rectangles; otherwise the window rectangles test passes and the fragment passes the window rectangles test.When the bound framebuffer object is zero, the window rectangles test always passes.
- Parameters:
mode- the rectangle mode. One of:INCLUSIVE_EXTEXCLUSIVE_EXTbox- an array of4*countwindow rectangle coordinates
-
glWindowRectanglesEXT
public static void glWindowRectanglesEXT(int mode, int[] box)Array version of:WindowRectanglesEXT
-
-