public class WGLARBBufferRegion
extends java.lang.Object
The buffer region extension is a mechanism that allows an area of an OpenGL window to be saved in off-screen memory for quick restores. The off-screen memory can either be frame buffer memory or system memory, although frame buffer memory might offer optimal performance.
A buffer region can be created for the front color, back color, depth, and/or stencil buffer. Multiple buffer regions for the same buffer type can exist.
| Modifier and Type | Field and Description |
|---|---|
static int |
WGL_BACK_COLOR_BUFFER_BIT_ARB
Accepted by the
type parameter of CreateBufferRegionARB. |
static int |
WGL_DEPTH_BUFFER_BIT_ARB
Accepted by the
type parameter of CreateBufferRegionARB. |
static int |
WGL_FRONT_COLOR_BUFFER_BIT_ARB
Accepted by the
type parameter of CreateBufferRegionARB. |
static int |
WGL_STENCIL_BUFFER_BIT_ARB
Accepted by the
type parameter of CreateBufferRegionARB. |
| Modifier and Type | Method and Description |
|---|---|
static long |
wglCreateBufferRegionARB(long hdc,
int layerPlane,
int type)
Creates a buffer region and returns a handle associated with it.
|
static void |
wglDeleteBufferRegionARB(long region)
Deletes a buffer region.
|
static boolean |
wglRestoreBufferRegionARB(long region,
int x,
int y,
int width,
int height,
int xSrc,
int ySrc)
Restores a previously saved buffer region.
|
static boolean |
wglSaveBufferRegionARB(long region,
int x,
int y,
int width,
int height)
Saves image, depth, and stencil data into the buffer region.
|
public static final int WGL_FRONT_COLOR_BUFFER_BIT_ARB
type parameter of CreateBufferRegionARB.public static final int WGL_BACK_COLOR_BUFFER_BIT_ARB
type parameter of CreateBufferRegionARB.public static final int WGL_DEPTH_BUFFER_BIT_ARB
type parameter of CreateBufferRegionARB.public static final int WGL_STENCIL_BUFFER_BIT_ARB
type parameter of CreateBufferRegionARB.public static long wglCreateBufferRegionARB(long hdc,
int layerPlane,
int type)
hdc - the device context for the device on which the buffer region is createdlayerPlane - the layer plane. Positive values identify overlay planes, negative values identify underlay planes. A value of 0 identifies the main plane.type - a bitwise OR of any of the following values indicating which buffers can be saved or restored. Multiple bits can be set and may result in better
performance if multiple buffers are saved or restored. One of:FRONT_COLOR_BUFFER_BIT_ARB | BACK_COLOR_BUFFER_BIT_ARB | DEPTH_BUFFER_BIT_ARB |
STENCIL_BUFFER_BIT_ARB |
public static void wglDeleteBufferRegionARB(long region)
region - a handle to a buffer region previously created with CreateBufferRegionARB.public static boolean wglSaveBufferRegionARB(long region,
int x,
int y,
int width,
int height)
Data outside the window for the specified rectangle is undefined. The OpenGL coordinate system is used for specifying the rectangle (x and
y specify the lower-left corner of the rectangle).
If an RC is current to the calling thread, a flush will occur before the save operation.
The saved buffer region area can be freed by calling wglSaveBufferRegionARB with width or height set to a value of 0.
region - a handle to a buffer region previously created with CreateBufferRegionARB.x - the window x-coordinate for the source rectangley - the window y-coordinate for the source rectanglewidth - the source rectangle widthheight - the source rectangle heightpublic static boolean wglRestoreBufferRegionARB(long region,
int x,
int y,
int width,
int height,
int xSrc,
int ySrc)
region - a handle to a buffer region previously created with CreateBufferRegionARB.x - the window x-coordinate for the destination rectangley - the window y-coordinate for the destination rectanglewidth - the destination rectangle widthheight - the destination rectangle heightxSrc - the buffer region x-coordinate for the source of the dataySrc - the buffer region y-coordinate for the source of the dataCopyright LWJGL. All Rights Reserved. License terms.