Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class WGLARBPbuffer

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

Native bindings to the WGL_ARB_pbuffer extension.

This extension defines pixel buffers (pbuffer for short). Pbuffers are additional non-visible rendering buffers for an OpenGL renderer. Pbuffers are equivalent to a window that has the same pixel format descriptor with the following exceptions:

  1. There is no rendering to a pbuffer by GDI.
  2. The pixel format descriptors used for a pbuffer can only be those that are supported by the ICD. Generic formats are not valid.
  3. The allocation of a pbuffer can fail if there are insufficient resources (i.e., all the pbuffer memory has been allocated).
  4. The pixel buffer might be lost if a display mode change occurs. A query is provided that can be called after a display mode change to determine the state of the pixel buffer.

The intent of the pbuffer semantics is to enable implementations to allocate pbuffers in non-visible frame buffer memory. These pbuffers are intended to be "static" resources in that a program will typically allocate them only once rather than as a part of its rendering loop. (Pbuffers should be deallocated when the program is no longer using them -- for example, if the program is iconified.)

The frame buffer resources that are associated with a pbuffer are also static and are deallocated when the pbuffer is destroyed or possibly when a display mode change occurs.

Requires WGL_ARB_extensions_string and WGL_ARB_pixel_format.

Field Summary

Modifier and TypeField and Description
public static final int
WGL_DRAW_TO_PBUFFER_ARB

Accepted by the attribIList parameter of ChoosePixelFormatARB and the attributes parameter of GetPixelFormatAttribivARB.

public static final int
WGL_MAX_PBUFFER_HEIGHT_ARB

Accepted by the attributes parameter of GetPixelFormatAttribivARB.

public static final int
WGL_MAX_PBUFFER_PIXELS_ARB

Accepted by the attributes parameter of GetPixelFormatAttribivARB.

public static final int
WGL_MAX_PBUFFER_WIDTH_ARB

Accepted by the attributes parameter of GetPixelFormatAttribivARB.

public static final int
WGL_PBUFFER_HEIGHT_ARB

Accepted by the attribute parameter of QueryPbufferARB.

public static final int
WGL_PBUFFER_LARGEST_ARB

Accepted by the attribList parameter of CreatePbufferARB.

public static final int
WGL_PBUFFER_LOST_ARB

Accepted by the attribute parameter of QueryPbufferARB.

public static final int
WGL_PBUFFER_WIDTH_ARB

Accepted by the attribute parameter of QueryPbufferARB.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
nwglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, long attribList)

Unsafe version of: CreatePbufferARB

public static int
nwglQueryPbufferARB(long pbuffer, int attribute, long value)

Unsafe version of: QueryPbufferARB

public static long
wglCreatePbufferARB(long
a device context for the device on which the pbuffer is created
hdc
,
int
a non-generic pixel format descriptor index
pixelFormat
,
int
the pixel width of the rectangular pbuffer
width
,
int
the pixel height of the rectangular pbuffer
height
,
IntBuffer
a 0-terminated list of attributes {type, value} pairs containing integer attribute values
attribList
)

Creates a pixel buffer (pbuffer) and returns a handle to it.

public static long
wglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, int[] attribList)

Array version of: CreatePbufferARB

public static boolean
wglDestroyPbufferARB(long
a pbuffer handle
pbuffer
)

Destroys a pbuffer.

public static long
wglGetPbufferDCARB(long
a pbuffer handle returned from a previous call to CreatePbufferARB
pbuffer
)

Creates a device context for the pbuffer.

public static boolean
wglQueryPbufferARB(long
a pbuffer handle
pbuffer
,
int attribute, IntBuffer
the attribute value
value
)

Queries an attribute associated with a specific pbuffer.

public static boolean
wglQueryPbufferARB(long pbuffer, int attribute, int[] value)

Array version of: QueryPbufferARB

public static int
wglReleasePbufferDCARB(long
a pbuffer handle
pbuffer
,
long
a device context handle
hdc
)

Releases a device context obtained from a previous call to GetPbufferDCARB.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

WGL_DRAW_TO_PBUFFER_ARBback to summary
public static final int WGL_DRAW_TO_PBUFFER_ARB

Accepted by the attribIList parameter of ChoosePixelFormatARB and the attributes parameter of GetPixelFormatAttribivARB.

WGL_MAX_PBUFFER_HEIGHT_ARBback to summary
public static final int WGL_MAX_PBUFFER_HEIGHT_ARB

Accepted by the attributes parameter of GetPixelFormatAttribivARB.

WGL_MAX_PBUFFER_PIXELS_ARBback to summary
public static final int WGL_MAX_PBUFFER_PIXELS_ARB

Accepted by the attributes parameter of GetPixelFormatAttribivARB.

WGL_MAX_PBUFFER_WIDTH_ARBback to summary
public static final int WGL_MAX_PBUFFER_WIDTH_ARB

Accepted by the attributes parameter of GetPixelFormatAttribivARB.

WGL_PBUFFER_HEIGHT_ARBback to summary
public static final int WGL_PBUFFER_HEIGHT_ARB

Accepted by the attribute parameter of QueryPbufferARB.

WGL_PBUFFER_LARGEST_ARBback to summary
public static final int WGL_PBUFFER_LARGEST_ARB

Accepted by the attribList parameter of CreatePbufferARB.

WGL_PBUFFER_LOST_ARBback to summary
public static final int WGL_PBUFFER_LOST_ARB

Accepted by the attribute parameter of QueryPbufferARB.

WGL_PBUFFER_WIDTH_ARBback to summary
public static final int WGL_PBUFFER_WIDTH_ARB

Accepted by the attribute parameter of QueryPbufferARB.

Constructor Detail

WGLARBPbufferback to summary
protected WGLARBPbuffer()

Method Detail

nwglCreatePbufferARBback to summary
public static long nwglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, long attribList)

Unsafe version of: CreatePbufferARB

nwglQueryPbufferARBback to summary
public static int nwglQueryPbufferARB(long pbuffer, int attribute, long value)

Unsafe version of: QueryPbufferARB

wglCreatePbufferARBback to summary
public static long wglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, IntBuffer attribList)

Creates a pixel buffer (pbuffer) and returns a handle to it.

Support for pbuffers may be restricted to specific pixel formats. Use GetPixelFormatAttribivARB to query the DRAW_TO_PBUFFER_ARB attribute to determine which pixel formats support the creation of pbuffers.

Parameters
hdc:long

a device context for the device on which the pbuffer is created

pixelFormat:int

a non-generic pixel format descriptor index

width:int

the pixel width of the rectangular pbuffer

height:int

the pixel height of the rectangular pbuffer

attribList:IntBuffer

a 0-terminated list of attributes {type, value} pairs containing integer attribute values

Annotations
@NativeType:HPBUFFERARB
wglCreatePbufferARBback to summary
public static long wglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, int[] attribList)

Array version of: CreatePbufferARB

Annotations
@NativeType:HPBUFFERARB
wglDestroyPbufferARBback to summary
public static boolean wglDestroyPbufferARB(long pbuffer)

Destroys a pbuffer.

The pbuffer is destroyed once it is no longer current to any rendering context. When a pbuffer is destroyed, any memory resources that are attached to it are freed and its handle is no longer valid.

Parameters
pbuffer:long

a pbuffer handle

Annotations
@NativeType:BOOL
wglGetPbufferDCARBback to summary
public static long wglGetPbufferDCARB(long pbuffer)

Creates a device context for the pbuffer.

Parameters
pbuffer:long

a pbuffer handle returned from a previous call to CreatePbufferARB

Annotations
@NativeType:HDC
wglQueryPbufferARBback to summary
public static boolean wglQueryPbufferARB(long pbuffer, int attribute, IntBuffer value)

Queries an attribute associated with a specific pbuffer.

Parameters
pbuffer:long

a pbuffer handle

attribute:int

the attribute to query. One of:

PBUFFER_WIDTH_ARBPBUFFER_HEIGHT_ARBPBUFFER_LOST_ARB
value:IntBuffer

the attribute value

Annotations
@NativeType:BOOL
wglQueryPbufferARBback to summary
public static boolean wglQueryPbufferARB(long pbuffer, int attribute, int[] value)

Array version of: QueryPbufferARB

Annotations
@NativeType:BOOL
wglReleasePbufferDCARBback to summary
public static int wglReleasePbufferDCARB(long pbuffer, long hdc)

Releases a device context obtained from a previous call to GetPbufferDCARB.

Parameters
pbuffer:long

a pbuffer handle

hdc:long

a device context handle