#include <wglWindow.h>


Public Member Functions | |
| WGLWindow (Window *parent) | |
| virtual void | configExit () |
| De-initialize this OS window. | |
| virtual void | makeCurrent () const |
| Make the OS window's rendering context and drawable current. | |
| virtual void | swapBuffers () |
| Swap the front and back buffer, for doublebuffered drawables. | |
| virtual void | joinNVSwapBarrier (const uint32_t group, const uint32_t barrier) |
| Join a NV_swap_group. | |
| virtual HWND | getWGLWindowHandle () const |
| virtual HPBUFFERARB | getWGLPBufferHandle () const |
| virtual HDC | getWGLDC () const |
| virtual HGLRC | getWGLContext () const |
| const WGLEventHandler * | getWGLEventHandler () const |
Data Access | |
| virtual void | setWGLWindowHandle (HWND handle) |
| Set the Win32 window handle for this window. | |
| virtual void | setWGLPBufferHandle (HPBUFFERARB handle) |
| Set the Win32 off screen pbuffer handle for this window. | |
| virtual void | setWGLContext (HGLRC context) |
| Set the WGL rendering context for this window. | |
WGL/Win32 initialization | |
| virtual bool | configInit () |
| Initialize this window for the WGL window system. | |
| virtual bool | initWGLAffinityDC () |
| Create, if needed, an affinity device context for this window. | |
| virtual void | exitWGLAffinityDC () |
| Destroy the affinity device context. | |
| virtual HDC | getWGLAffinityDC () |
| virtual HDC | createWGLDisplayDC () |
| Create a device context for the display device of the window. | |
| virtual int | chooseWGLPixelFormat () |
| Choose a pixel format based on the window's attributes. | |
| virtual bool | configInitWGLDrawable (int pixelFormat) |
| Initialize the window's drawable (pbuffer or window) and bind the WGL context. | |
| virtual bool | configInitWGLWindow (int pixelFormat) |
| Initialize the window with an on-screen Win32 window. | |
| virtual bool | configInitWGLPBuffer (int pixelFormat) |
| Initialize the window with an off-screen WGL PBuffer. | |
| virtual bool | configInitWGLFBO (int pixelFormat) |
| Initialize the window for an off-screen FBO. | |
| virtual HGLRC | createWGLContext () |
| Create a WGL context. | |
| virtual void | initEventHandler () |
| virtual void | exitEventHandler () |
| virtual bool | processEvent (const WGLWindowEvent &event) |
Protected Types | |
| enum | WGLDCType { WGL_DC_NONE, WGL_DC_WINDOW, WGL_DC_PBUFFER, WGL_DC_AFFINITY, WGL_DC_DISPLAY } |
| The type of the Win32 device context. More... | |
Protected Member Functions | |
| void | setWGLDC (HDC dc, const WGLDCType type) |
| Set new device context and release the old DC. | |
| void | leaveNVSwapBarrier () |
| Unbind a WGL_NV_swap_barrier. | |
Definition at line 55 of file wglWindow.h.
enum eq::WGLWindow::WGLDCType [protected] |
The type of the Win32 device context.
Definition at line 214 of file wglWindow.h.
| void eq::WGLWindow::configExit | ( | ) | [virtual] |
De-initialize this OS window.
This function might be called on partially or uninitialized OS windows, and has therefore be tolerant enough to handle this.
Implements eq::OSWindow.
Definition at line 52 of file wglWindow.cpp.
References eq::OSWindow::configExitFBO(), EQINFO, eq::OSWindow::exitGLEW(), exitWGLAffinityDC(), getWGLContext(), getWGLPBufferHandle(), getWGLWindowHandle(), eq::Window::IATTR_HINT_FULLSCREEN, eq::Window::IATTR_HINT_SCREENSAVER, leaveNVSwapBarrier(), eq::ON, setWGLContext(), setWGLDC(), setWGLPBufferHandle(), setWGLWindowHandle(), and WGL_DC_NONE.
Referenced by configInit().


| void eq::WGLWindow::makeCurrent | ( | ) | const [virtual] |
Make the OS window's rendering context and drawable current.
This function invalidates the pipe's make current cache. If this function is not called, Pipe::setCurrent() has to be called appropriately.
Reimplemented from eq::OSWindow.
Definition at line 96 of file wglWindow.cpp.
Referenced by configInit().

| void eq::WGLWindow::swapBuffers | ( | ) | [virtual] |
Swap the front and back buffer, for doublebuffered drawables.
Implements eq::OSWindow.
Definition at line 102 of file wglWindow.cpp.
| void eq::WGLWindow::joinNVSwapBarrier | ( | const uint32_t | group, | |
| const uint32_t | barrier | |||
| ) | [virtual] |
Join a NV_swap_group.
See WGL or GLX implementation and OpenGL extension for details on how to implement this function.
| group | the swap group name. | |
| barrier | the swap barrier name. |
Implements eq::OSWindow.
Definition at line 786 of file wglWindow.cpp.
| virtual HWND eq::WGLWindow::getWGLWindowHandle | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 68 of file wglWindow.h.
Referenced by configExit().

| virtual HPBUFFERARB eq::WGLWindow::getWGLPBufferHandle | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 71 of file wglWindow.h.
Referenced by configExit().

| virtual HDC eq::WGLWindow::getWGLDC | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 74 of file wglWindow.h.
| virtual HGLRC eq::WGLWindow::getWGLContext | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 77 of file wglWindow.h.
Referenced by configExit(), and createWGLContext().

| const WGLEventHandler* eq::WGLWindow::getWGLEventHandler | ( | ) | const [inline] |
| void eq::WGLWindow::setWGLWindowHandle | ( | HWND | handle | ) | [virtual] |
Set the Win32 window handle for this window.
This function should only be called from configInit() or configExit().
| handle | the window handle. |
Definition at line 112 of file wglWindow.cpp.
References eq::OSWindow::_window, eq::PixelViewport::h, eq::Window::setPixelViewport(), setWGLDC(), eq::PixelViewport::w, WGL_DC_NONE, WGL_DC_WINDOW, eq::PixelViewport::x, and eq::PixelViewport::y.
Referenced by configExit(), and configInitWGLWindow().


| void eq::WGLWindow::setWGLPBufferHandle | ( | HPBUFFERARB | handle | ) | [virtual] |
Set the Win32 off screen pbuffer handle for this window.
This function should only be called from configInit() or configExit().
| handle | the pbuffer handle. |
Definition at line 146 of file wglWindow.cpp.
References eq::OSWindow::_window, eq::PixelViewport::h, eq::Window::setPixelViewport(), setWGLDC(), eq::PixelViewport::w, WGL_DC_NONE, and WGL_DC_PBUFFER.
Referenced by configExit(), and configInitWGLPBuffer().


| void eq::WGLWindow::setWGLContext | ( | HGLRC | context | ) | [virtual] |
Set the WGL rendering context for this window.
This function should only be called from configInit() or configExit(). The context has to be set to 0 before it is destroyed.
| context | the WGL rendering context. |
Definition at line 107 of file wglWindow.cpp.
Referenced by configExit(), and configInit().

| bool eq::WGLWindow::configInit | ( | ) | [virtual] |
Initialize this window for the WGL window system.
This method first calls createWGLAffinityDC(), then chooses a pixel format with chooseWGLPixelFormat(), then creates a drawable using configInitWGLDrawable() and finally creates the context using createWGLContext().
Implements eq::OSWindow.
Definition at line 219 of file wglWindow.cpp.
References eq::OSWindow::_window, eq::AUTO, chooseWGLPixelFormat(), configExit(), eq::OSWindow::configInitFBO(), configInitWGLDrawable(), createWGLContext(), EQWARN, exitWGLAffinityDC(), eq::FBO, eq::Window::IATTR_HINT_DRAWABLE, eq::Window::IATTR_HINT_SWAPSYNC, eq::OSWindow::initGLEW(), initWGLAffinityDC(), makeCurrent(), eq::OFF, eq::Window::setErrorMessage(), setWGLContext(), setWGLDC(), and WGL_DC_NONE.

| bool eq::WGLWindow::initWGLAffinityDC | ( | ) | [virtual] |
Create, if needed, an affinity device context for this window.
Definition at line 499 of file wglWindow.cpp.
References eq::WGLPipe::createWGLAffinityDC(), and eq::Pipe::getOSPipe().
Referenced by configInit().


| void eq::WGLWindow::exitWGLAffinityDC | ( | ) | [virtual] |
Destroy the affinity device context.
Definition at line 490 of file wglWindow.cpp.
Referenced by configExit(), and configInit().

| HDC eq::WGLWindow::getWGLAffinityDC | ( | ) | [virtual] |
Reimplemented from eq::WGLWindowIF.
Definition at line 514 of file wglWindow.cpp.
References WGL_DC_AFFINITY.
| HDC eq::WGLWindow::createWGLDisplayDC | ( | ) | [virtual] |
Create a device context for the display device of the window.
The returned device context has to be released using DeleteDC. The window's error message is set if an error occured.
Definition at line 523 of file wglWindow.cpp.
References eq::WGLPipe::createWGLDisplayDC(), and eq::Pipe::getOSPipe().
Referenced by configInitWGLPBuffer().


| int eq::WGLWindow::chooseWGLPixelFormat | ( | ) | [virtual] |
Choose a pixel format based on the window's attributes.
Uses the currently set DC (if any) and sets the chosen pixel format on it.
Definition at line 535 of file wglWindow.cpp.
References eq::OSWindow::_window, eq::AUTO, EQWARN, eq::FBO, eq::Window::IATTR_HINT_DOUBLEBUFFER, eq::Window::IATTR_HINT_DRAWABLE, eq::Window::IATTR_HINT_STEREO, eq::Window::IATTR_PLANES_ACCUM, eq::Window::IATTR_PLANES_ACCUM_ALPHA, eq::Window::IATTR_PLANES_ALPHA, eq::Window::IATTR_PLANES_COLOR, eq::Window::IATTR_PLANES_DEPTH, eq::Window::IATTR_PLANES_SAMPLES, eq::Window::IATTR_PLANES_STENCIL, eq::ON, eq::PBUFFER, eq::RGBA16F, eq::RGBA32F, eq::Window::setErrorMessage(), and eq::WINDOW.
Referenced by configInit().


| bool eq::WGLWindow::configInitWGLDrawable | ( | int | pixelFormat | ) | [virtual] |
Initialize the window's drawable (pbuffer or window) and bind the WGL context.
Sets the window handle on success.
| pixelFormat | the window's target pixel format. |
Definition at line 280 of file wglWindow.cpp.
References configInitWGLFBO(), configInitWGLPBuffer(), configInitWGLWindow(), EQWARN, eq::FBO, eq::Window::IATTR_HINT_DRAWABLE, eq::PBUFFER, eq::UNDEFINED, and eq::WINDOW.
Referenced by configInit().


| bool eq::WGLWindow::configInitWGLWindow | ( | int | pixelFormat | ) | [virtual] |
Initialize the window with an on-screen Win32 window.
Sets the window handle on success.
| pixelFormat | the window's target pixel format. |
Definition at line 340 of file wglWindow.cpp.
References eq::OSWindow::_window, eq::Window::getPixelViewport(), eq::Window::IATTR_HINT_SCREENSAVER, eq::ON, eq::Window::setErrorMessage(), and setWGLWindowHandle().
Referenced by configInitWGLDrawable().


| bool eq::WGLWindow::configInitWGLPBuffer | ( | int | pixelFormat | ) | [virtual] |
Initialize the window with an off-screen WGL PBuffer.
Sets the window handle on success.
| pixelFormat | the window's target pixel format. |
Definition at line 458 of file wglWindow.cpp.
References eq::OSWindow::_window, createWGLDisplayDC(), eq::Window::getPixelViewport(), eq::PixelViewport::h, eq::PixelViewport::isValid(), eq::Window::setErrorMessage(), setWGLPBufferHandle(), and eq::PixelViewport::w.
Referenced by configInitWGLDrawable().


| HGLRC eq::WGLWindow::createWGLContext | ( | ) | [virtual] |
Create a WGL context.
This method does not set the window's WGL context.
Definition at line 727 of file wglWindow.cpp.
References eq::OSWindow::_window, EQWARN, eq::Window::getOSWindow(), eq::Window::getSharedContextWindow(), getWGLContext(), and eq::Window::setErrorMessage().
Referenced by configInit().


| void eq::WGLWindow::setWGLDC | ( | HDC | dc, | |
| const WGLDCType | type | |||
| ) | [protected] |
Set new device context and release the old DC.
| dc | the new DC. | |
| type | the type of the new DC. |
Definition at line 172 of file wglWindow.cpp.
References WGL_DC_AFFINITY, WGL_DC_DISPLAY, WGL_DC_NONE, WGL_DC_PBUFFER, and WGL_DC_WINDOW.
Referenced by configExit(), configInit(), configInitWGLFBO(), setWGLPBufferHandle(), and setWGLWindowHandle().

| void eq::WGLWindow::leaveNVSwapBarrier | ( | ) | [protected] |
Unbind a WGL_NV_swap_barrier.
Definition at line 836 of file wglWindow.cpp.
Referenced by configExit().

0.9 by
1.5.8