Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class WGLARBBufferRegion

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

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

Modifier and TypeField and Description
public static final int
WGL_BACK_COLOR_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

public static final int
WGL_DEPTH_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

public static final int
WGL_FRONT_COLOR_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

public static final int
WGL_STENCIL_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
wglCreateBufferRegionARB(long
the device context for the device on which the buffer region is created
hdc
,
int
the layer plane. Positive values identify overlay planes, negative values identify underlay planes. A value of 0 identifies the main plane.
layerPlane
,
int
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_ARBBACK_COLOR_BUFFER_BIT_ARBDEPTH_BUFFER_BIT_ARB
STENCIL_BUFFER_BIT_ARB
type
)

Creates a buffer region and returns a handle associated with it.

public static void
wglDeleteBufferRegionARB(long
a handle to a buffer region previously created with CreateBufferRegionARB.
region
)

Deletes a buffer region.

public static boolean
wglRestoreBufferRegionARB(long
a handle to a buffer region previously created with CreateBufferRegionARB.
region
,
int
the window x-coordinate for the destination rectangle
x
,
int
the window y-coordinate for the destination rectangle
y
,
int
the destination rectangle width
width
,
int
the destination rectangle height
height
,
int
the buffer region x-coordinate for the source of the data
xSrc
,
int
the buffer region y-coordinate for the source of the data
ySrc
)

Restores a previously saved buffer region.

public static boolean
wglSaveBufferRegionARB(long
a handle to a buffer region previously created with CreateBufferRegionARB.
region
,
int
the window x-coordinate for the source rectangle
x
,
int
the window y-coordinate for the source rectangle
y
,
int
the source rectangle width
width
,
int
the source rectangle height
height
)

Saves image, depth, and stencil data into the buffer region.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

WGL_BACK_COLOR_BUFFER_BIT_ARBback to summary
public static final int WGL_BACK_COLOR_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

WGL_DEPTH_BUFFER_BIT_ARBback to summary
public static final int WGL_DEPTH_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

WGL_FRONT_COLOR_BUFFER_BIT_ARBback to summary
public static final int WGL_FRONT_COLOR_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

WGL_STENCIL_BUFFER_BIT_ARBback to summary
public static final int WGL_STENCIL_BUFFER_BIT_ARB

Accepted by the type parameter of CreateBufferRegionARB.

Constructor Detail

WGLARBBufferRegionback to summary
protected WGLARBBufferRegion()

Method Detail

wglCreateBufferRegionARBback to summary
public static long wglCreateBufferRegionARB(long hdc, int layerPlane, int type)

Creates a buffer region and returns a handle associated with it.

Parameters
hdc:long

the device context for the device on which the buffer region is created

layerPlane:int

the layer plane. Positive values identify overlay planes, negative values identify underlay planes. A value of 0 identifies the main plane.

type:int

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_ARBBACK_COLOR_BUFFER_BIT_ARBDEPTH_BUFFER_BIT_ARB
STENCIL_BUFFER_BIT_ARB
Annotations
@NativeType:HANDLE
wglDeleteBufferRegionARBback to summary
public static void wglDeleteBufferRegionARB(long region)

Deletes a buffer region.

Parameters
region:long

a handle to a buffer region previously created with CreateBufferRegionARB.

Annotations
@NativeType:VOID
wglRestoreBufferRegionARBback to summary
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:long

a handle to a buffer region previously created with CreateBufferRegionARB.

x:int

the window x-coordinate for the destination rectangle

y:int

the window y-coordinate for the destination rectangle

width:int

the destination rectangle width

height:int

the destination rectangle height

xSrc:int

the buffer region x-coordinate for the source of the data

ySrc:int

the buffer region y-coordinate for the source of the data

Annotations
@NativeType:BOOL
wglSaveBufferRegionARBback to summary
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 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.

Parameters
region:long

a handle to a buffer region previously created with CreateBufferRegionARB.

x:int

the window x-coordinate for the source rectangle

y:int

the window y-coordinate for the source rectangle

width:int

the source rectangle width

height:int

the source rectangle height

Annotations
@NativeType:BOOL