Class WGLARBBufferRegion
- java.lang.Object
-
- org.lwjgl.opengl.WGLARBBufferRegion
-
public class WGLARBBufferRegion extends java.lang.Object
Native bindings to the WGL_ARB_buffer_region extension.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.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
WGL_BACK_COLOR_BUFFER_BIT_ARB
WGL_DEPTH_BUFFER_BIT_ARB
WGL_FRONT_COLOR_BUFFER_BIT_ARB
WGL_STENCIL_BUFFER_BIT_ARBAccepted by thetype
parameter ofCreateBufferRegionARB
.
-
Method Summary
All Methods Static Methods Concrete Methods 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.
-
-
-
Field Detail
-
WGL_FRONT_COLOR_BUFFER_BIT_ARB, WGL_BACK_COLOR_BUFFER_BIT_ARB, WGL_DEPTH_BUFFER_BIT_ARB, WGL_STENCIL_BUFFER_BIT_ARB
Accepted by thetype
parameter ofCreateBufferRegionARB
.
-
-
Method Detail
-
wglCreateBufferRegionARB
public static long wglCreateBufferRegionARB(long hdc, int layerPlane, int type)
Creates a buffer region and returns a handle associated with it.- Parameters:
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
-
wglDeleteBufferRegionARB
public static void wglDeleteBufferRegionARB(long region)
Deletes a buffer region.- Parameters:
region
- a handle to a buffer region previously created withCreateBufferRegionARB
.
-
wglSaveBufferRegionARB
public static boolean wglSaveBufferRegionARB(long region, int x, int y, int width, int height)
Saves image, depth, and stencil data into the buffer region.Data outside the window for the specified rectangle is undefined. The OpenGL coordinate system is used for specifying the rectangle (
x
andy
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
withwidth
orheight
set to a value of 0.- Parameters:
region
- a handle to a buffer region previously created withCreateBufferRegionARB
.x
- the window x-coordinate for the source rectangley
- the window y-coordinate for the source rectanglewidth
- the source rectangle widthheight
- the source rectangle height
-
wglRestoreBufferRegionARB
public static boolean wglRestoreBufferRegionARB(long region, int x, int y, int width, int height, int xSrc, int ySrc)
Restores a previously saved buffer region.- Parameters:
region
- a handle to a buffer region previously created withCreateBufferRegionARB
.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 data
-
-