Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class EXTWindowRectangles

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Native 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_EXT mode) or be rejected if the fragment is within any of the operational window rectangles (EXCLUSIVE_EXT mode).

These window rectangles operate orthogonally to the existing scissor test functionality.

This extension has specification language for both OpenGL and ES so EXT_window_rectangles can be implemented and advertised for either or both API contexts.

Requires GL30 or EXT_draw_buffers2.

Field Summary

Modifier and TypeField and Description
public static final int
GL_EXCLUSIVE_EXT

Accepted by the mode parameter of WindowRectanglesEXT.

public static final int
GL_INCLUSIVE_EXT

Accepted by the mode parameter of WindowRectanglesEXT.

public static final int
GL_MAX_WINDOW_RECTANGLES_EXT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.

public static final int
GL_NUM_WINDOW_RECTANGLES_EXT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.

public static final int
GL_WINDOW_RECTANGLE_EXT

Accepted by the pname parameter of GetIntegeri_v, GetInteger64i_v, GetBooleani_v, GetFloati_v, GetDoublei_v, GetIntegerIndexedvEXT, GetFloatIndexedvEXT, GetDoubleIndexedvEXT, GetBooleanIndexedvEXT, and GetIntegeri_vEXT.

public static final int
GL_WINDOW_RECTANGLE_MODE_EXT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glWindowRectanglesEXT(int
the rectangle mode. One of:
INCLUSIVE_EXTEXCLUSIVE_EXT
mode
,
IntBuffer
an array of 4*count window rectangle coordinates
box
)

Sets the active window rectangles.

public static void
glWindowRectanglesEXT(int mode, int[] box)

Array version of: WindowRectanglesEXT

public static native void
nglWindowRectanglesEXT(int mode, int
the number of active window rectangles. Must be between zero and the value of MAX_WINDOW_RECTANGLES_EXT.
count
,
long box)

Unsafe version of: WindowRectanglesEXT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_EXCLUSIVE_EXTback to summary
public static final int GL_EXCLUSIVE_EXT

Accepted by the mode parameter of WindowRectanglesEXT.

GL_INCLUSIVE_EXTback to summary
public static final int GL_INCLUSIVE_EXT

Accepted by the mode parameter of WindowRectanglesEXT.

GL_MAX_WINDOW_RECTANGLES_EXTback to summary
public static final int GL_MAX_WINDOW_RECTANGLES_EXT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.

GL_NUM_WINDOW_RECTANGLES_EXTback to summary
public static final int GL_NUM_WINDOW_RECTANGLES_EXT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.

GL_WINDOW_RECTANGLE_EXTback to summary
public static final int GL_WINDOW_RECTANGLE_EXT

Accepted by the pname parameter of GetIntegeri_v, GetInteger64i_v, GetBooleani_v, GetFloati_v, GetDoublei_v, GetIntegerIndexedvEXT, GetFloatIndexedvEXT, GetDoubleIndexedvEXT, GetBooleanIndexedvEXT, and GetIntegeri_vEXT.

GL_WINDOW_RECTANGLE_MODE_EXTback to summary
public static final int GL_WINDOW_RECTANGLE_MODE_EXT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.

Constructor Detail

EXTWindowRectanglesback to summary
protected EXTWindowRectangles()

Method Detail

glWindowRectanglesEXTback to summary
public static void glWindowRectanglesEXT(int mode, IntBuffer box)

Sets the active window rectangles.

When the WindowRectanglesEXT command is processed without error, the ith window rectangle box is set to the corresponding four parameters for values of i less then n. For values of i greater than n, 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 i has a lower-left origin at (x_i,y_i) and upper-right corner at (x_i+w_i,y_i+h_i).

The INVALID_VALUE error is generated if any element w_i or h_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 all i less than n:


x_i ≤ xw < x_i+w_i
y_i ≤ yw < y_i+h_i

When the window rectangles mode is INCLUSIVE_EXT mode 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 current n active window rectangles; otherwise the window rectangles test fails and the fragment is discarded.

When the window rectangles mode is EXCLUSIVE_EXT mode 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 current n active 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:int

the rectangle mode. One of:

INCLUSIVE_EXTEXCLUSIVE_EXT
box:IntBuffer

an array of 4*count window rectangle coordinates

glWindowRectanglesEXTback to summary
public static void glWindowRectanglesEXT(int mode, int[] box)

Array version of: WindowRectanglesEXT

nglWindowRectanglesEXTback to summary
public static native void nglWindowRectanglesEXT(int mode, int count, long box)

Unsafe version of: WindowRectanglesEXT

Parameters
count:int

the number of active window rectangles. Must be between zero and the value of MAX_WINDOW_RECTANGLES_EXT.