Contents
- Dependencies
- Overview
- New Procedures and Functions
- New Tokens
- New State
- New Implementation Dependent State
Dependencies
WGL_ARB_extensions_string is required.
WGL_ARB_pixel_format is required.
WGL_ARB_make_current_read affects the definition of this extension.
Overview
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.
New Procedures and Functions
``` DECLARE_HANDLE(HPBUFFERARB);
HPBUFFERARB wglCreatePbufferARB(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
HDC wglGetPbufferDCARB(HPBUFFERARB hPbuffer);
int wglReleasePbufferDCARB(HPBUFFERARB hPbuffer, HDC hDC);
BOOL wglDestroyPbufferARB(HPBUFFERARB hPbuffer);
BOOL wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAttribute, int *piValue); ```
New Tokens
Accepted by the
<attribute>
parameter of wglChoosePixelFormatEXT:
| WGL_DRAW_TO_PBUFFER_ARB | 0x202D| |:---------------------------------|:-------------|
Accepted by the
<attribute>
parameter of wglGetPixelFormatAttribivEXT, and wglGetPixelFormatAttribfvEXT:
|WGL_DRAW_TO_PBUFFER_ARB | 0x202D| |:-----------------------------------|:----------| |WGL_MAX_PBUFFER_PIXELS_ARB | 0x202E| |WGL_MAX_PBUFFER_WIDTH_ARB | 0x202F| |WGL_MAX_PBUFFER_HEIGHT_ARB | 0x2030|
Accepted by the
<piAttribList>
parameter of wglCreatePbufferARB:
|WGL_PBUFFER_LARGEST_ARB | 0x2033| |:---------------------------------|:-----------|
Accepted by the
<iAttribute>
parameter of wglQueryPbufferARB:
|WGL_PBUFFER_WIDTH_ARB | 0x2034| |:--------------------------------|:------------| |WGL_PBUFFER_HEIGHT_ARB | 0x2035| |WGL_PBUFFER_LOST_ARB | 0x2036|
New State
None
New Implementation Dependent State
None