Class WGLARBPbuffer
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:
- There is no rendering to a pbuffer by GDI.
- The pixel format descriptors used for a pbuffer can only be those that are supported by the ICD. Generic formats are not valid.
- The allocation of a pbuffer can fail if there are insufficient resources (i.e., all the pbuffer memory has been allocated).
- 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
FieldsModifier and TypeFieldDescriptionstatic final intAccepted by theattribIListparameter ofChoosePixelFormatARBand theattributesparameter ofGetPixelFormatAttribivARB.static final intAccepted by theattributesparameter ofGetPixelFormatAttribivARB.static final intAccepted by theattributesparameter ofGetPixelFormatAttribivARB.static final intAccepted by theattributesparameter ofGetPixelFormatAttribivARB.static final intAccepted by theattributeparameter ofQueryPbufferARB.static final intAccepted by theattribListparameter ofCreatePbufferARB.static final intAccepted by theattributeparameter ofQueryPbufferARB.static final intAccepted by theattributeparameter ofQueryPbufferARB. -
Method Summary
Modifier and TypeMethodDescriptionstatic longnwglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, long attribList) Unsafe version of:CreatePbufferARBstatic intnwglQueryPbufferARB(long pbuffer, int attribute, long value) Unsafe version of:QueryPbufferARBstatic longwglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, int[] attribList) Array version of:CreatePbufferARBstatic longwglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, IntBuffer attribList) Creates a pixel buffer (pbuffer) and returns a handle to it.static booleanwglDestroyPbufferARB(long pbuffer) Destroys a pbuffer.static longwglGetPbufferDCARB(long pbuffer) Creates a device context for the pbuffer.static booleanwglQueryPbufferARB(long pbuffer, int attribute, int[] value) Array version of:QueryPbufferARBstatic booleanwglQueryPbufferARB(long pbuffer, int attribute, IntBuffer value) Queries an attribute associated with a specific pbuffer.static intwglReleasePbufferDCARB(long pbuffer, long hdc) Releases a device context obtained from a previous call toGetPbufferDCARB.
-
Field Details
-
WGL_DRAW_TO_PBUFFER_ARB
public static final int WGL_DRAW_TO_PBUFFER_ARBAccepted by theattribIListparameter ofChoosePixelFormatARBand theattributesparameter ofGetPixelFormatAttribivARB.- See Also:
-
WGL_MAX_PBUFFER_PIXELS_ARB
public static final int WGL_MAX_PBUFFER_PIXELS_ARBAccepted by theattributesparameter ofGetPixelFormatAttribivARB.- See Also:
-
WGL_MAX_PBUFFER_WIDTH_ARB
public static final int WGL_MAX_PBUFFER_WIDTH_ARBAccepted by theattributesparameter ofGetPixelFormatAttribivARB.- See Also:
-
WGL_MAX_PBUFFER_HEIGHT_ARB
public static final int WGL_MAX_PBUFFER_HEIGHT_ARBAccepted by theattributesparameter ofGetPixelFormatAttribivARB.- See Also:
-
WGL_PBUFFER_LARGEST_ARB
public static final int WGL_PBUFFER_LARGEST_ARBAccepted by theattribListparameter ofCreatePbufferARB.- See Also:
-
WGL_PBUFFER_WIDTH_ARB
public static final int WGL_PBUFFER_WIDTH_ARBAccepted by theattributeparameter ofQueryPbufferARB.- See Also:
-
WGL_PBUFFER_HEIGHT_ARB
public static final int WGL_PBUFFER_HEIGHT_ARBAccepted by theattributeparameter ofQueryPbufferARB.- See Also:
-
WGL_PBUFFER_LOST_ARB
public static final int WGL_PBUFFER_LOST_ARBAccepted by theattributeparameter ofQueryPbufferARB.- See Also:
-
-
Method Details
-
nwglCreatePbufferARB
public static long nwglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, long attribList) Unsafe version of:CreatePbufferARB -
wglCreatePbufferARB
public static long wglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, @Nullable IntBuffer attribList) Creates a pixel buffer (pbuffer) and returns a handle to it.Support for pbuffers may be restricted to specific pixel formats. Use
GetPixelFormatAttribivARBto query theDRAW_TO_PBUFFER_ARBattribute to determine which pixel formats support the creation of pbuffers.- Parameters:
hdc- a device context for the device on which the pbuffer is createdpixelFormat- a non-generic pixel format descriptor indexwidth- the pixel width of the rectangular pbufferheight- the pixel height of the rectangular pbufferattribList- a 0-terminated list of attributes {type, value} pairs containing integer attribute values
-
wglGetPbufferDCARB
public static long wglGetPbufferDCARB(long pbuffer) Creates a device context for the pbuffer.- Parameters:
pbuffer- a pbuffer handle returned from a previous call toCreatePbufferARB
-
wglReleasePbufferDCARB
public static int wglReleasePbufferDCARB(long pbuffer, long hdc) Releases a device context obtained from a previous call toGetPbufferDCARB.- Parameters:
pbuffer- a pbuffer handlehdc- a device context handle
-
wglDestroyPbufferARB
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- a pbuffer handle
-
nwglQueryPbufferARB
public static int nwglQueryPbufferARB(long pbuffer, int attribute, long value) Unsafe version of:QueryPbufferARB -
wglQueryPbufferARB
Queries an attribute associated with a specific pbuffer.- Parameters:
pbuffer- a pbuffer handleattribute- the attribute to query. One of:PBUFFER_WIDTH_ARBPBUFFER_HEIGHT_ARBPBUFFER_LOST_ARBvalue- the attribute value
-
wglCreatePbufferARB
public static long wglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, @Nullable int[] attribList) Array version of:CreatePbufferARB -
wglQueryPbufferARB
public static boolean wglQueryPbufferARB(long pbuffer, int attribute, int[] value) Array version of:QueryPbufferARB
-