A tiny specialization on GLGraphicsStateGuardian to add some wgl-specific information.
More...
Public Member Functions |
|
| wglGraphicsStateGuardian (GraphicsEngine *engine, GraphicsPipe *pipe, wglGraphicsStateGuardian *share_with) |
| void | choose_pixel_format (const FrameBufferProperties &properties, bool need_pbuffer) |
| | Selects a pixel format for all the windows and buffers that use this gsg.
|
| bool | fail_pfnum () |
| | This is called by wglGraphicsWindow when it finds it cannot use the pfnum determined by the GSG.
|
|
virtual TypeHandle | force_init_type () |
| HGLRC | get_context (HDC hdc) |
| | Returns the GL context associated with the GSG.
|
| const FrameBufferProperties & | get_fb_properties () const |
| | Returns the properties of the pixel format that was chosen for this gsg.
|
| int | get_pfnum () const |
| | Returns the pixel format number chosen for windows that use this context.
|
| void | get_properties (FrameBufferProperties &properties, HDC hdc, int pfnum) |
| | Gets the FrameBufferProperties to match the indicated pixel format descriptor.
|
| bool | get_properties_advanced (FrameBufferProperties &properties, HDC hdc, int pfnum) |
| | Gets the FrameBufferProperties to match the indicated pixel format descriptor, using the WGL extensions.
|
| HDC | get_twindow_dc () |
| | Returns the DC associated with the temporary, invisible window that was created with the gsg to query WGL extensions.
|
|
virtual TypeHandle | get_type () const |
| bool | made_context () const |
| | Returns true if the GSG has had a context made for it already, false otherwise.
|
| bool | pfnum_supports_pbuffer () const |
| | Returns true if the gsg's pixel format is capable of supporting a pbuffer.
|
| virtual void | reset () |
| | Resets all internal state as if the gsg were newly created.
|
| void | restore_gamma () |
| | Restore original gamma.
|
| bool | set_gamma (float gamma) |
| | Non static version of setting gamma.
|
Static Public Member Functions |
| static void | atexit_function (void) |
| | This function is passed to the atexit function.
|
|
static TypeHandle | get_class_type () |
| static bool | get_gamma_table (void) |
| | Static function for getting the original gamma.
|
|
static void | init_type () |
| static bool | static_set_gamma (bool restore, float gamma) |
| | Static function for setting gamma which is needed for atexit.
|
Public Attributes |
|
bool | _supports_pbuffer |
|
bool | _supports_pixel_format |
|
bool | _supports_swap_control |
|
bool | _supports_wgl_multisample |
|
PFNWGLBINDTEXIMAGEARBPROC | _wglBindTexImageARB |
|
PFNWGLCHOOSEPIXELFORMATARBPROC | _wglChoosePixelFormatARB |
|
PFNWGLCREATEPBUFFERARBPROC | _wglCreatePbufferARB |
|
PFNWGLDESTROYPBUFFERARBPROC | _wglDestroyPbufferARB |
|
PFNWGLGETPBUFFERDCARBPROC | _wglGetPbufferDCARB |
|
PFNWGLGETPIXELFORMATATTRIBFVARBPROC | _wglGetPixelFormatAttribfvARB |
|
PFNWGLGETPIXELFORMATATTRIBIVARBPROC | _wglGetPixelFormatAttribivARB |
|
PFNWGLQUERYPBUFFERARBPROC | _wglQueryPbufferARB |
|
PFNWGLRELEASEPBUFFERDCARBPROC | _wglReleasePbufferDCARB |
|
PFNWGLRELEASETEXIMAGEARBPROC | _wglReleaseTexImageARB |
|
PFNWGLSETPBUFFERATTRIBARBPROC | _wglSetPbufferAttribARB |
|
PFNWGLSWAPINTERVALEXTPROC | _wglSwapIntervalEXT |
Protected Member Functions |
| virtual void * | do_get_extension_func (const char *prefix, const char *name) |
| | Returns the pointer to the GL extension function with the indicated name.
|
| virtual void | get_extra_extensions () |
| | This may be redefined by a derived class (e.g.
|
Friends |
|
class | wglGraphicsBuffer |
A tiny specialization on GLGraphicsStateGuardian to add some wgl-specific information.
Definition at line 31 of file wglGraphicsStateGuardian.h.
| bool wglGraphicsStateGuardian::fail_pfnum |
( |
| ) |
|
This is called by wglGraphicsWindow when it finds it cannot use the pfnum determined by the GSG.
Assuming this pfnum corresponds to an "advanced" frame buffer determined by wglChoosePixelFormatARB, this asks the GSG to swap out that pfnum for the earlier, "preliminary" pfnum determined via DescribePixelFormat().
This is a one-way operation. Once called, you can never go back to the advanced pfnum.
This method returns true if a change was successfully made, or false if there was no second tier to fall back to.
Definition at line 86 of file wglGraphicsStateGuardian.cxx.
Referenced by wglGraphicsWindow::open_window().
Returns the properties of the pixel format that was chosen for this gsg.
In OpenGL under Microsoft Windows, the window must be created first and then the GL context is created from the window, and the context inherits the pixel format of the window. Therefore, all windows that share a particular context must also share the same pixel format.
Definition at line 54 of file wglGraphicsStateGuardian.I.
Referenced by wglGraphicsBuffer::open_buffer(), and wglGraphicsWindow::open_window().
| int wglGraphicsStateGuardian::get_pfnum |
( |
| ) |
const [inline] |
Returns the pixel format number chosen for windows that use this context.
In OpenGL under Microsoft Windows, the window must be created first and then the GL context is created from the window, and the context inherits the pixel format of the window. Therefore, all windows that share a particular context must also share the same pixel format.
Definition at line 27 of file wglGraphicsStateGuardian.I.
Referenced by wglGraphicsWindow::open_window().