Equalizer 1.0
|
Equalizer default implementation of a WGL window. More...
#include <wglWindow.h>
Public Member Functions | |
WGLWindow (Window *parent) | |
Create a new WGL window for the given eq::Window. | |
virtual | ~WGLWindow () |
Destruct the WGL window. | |
Data Access | |
virtual void | setWGLContext (HGLRC context) |
Set the WGL rendering context for this window. | |
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 HWND | getWGLWindowHandle () const |
virtual HPBUFFERARB | getWGLPBufferHandle () const |
virtual HDC | getWGLDC () const |
virtual HGLRC | getWGLContext () const |
const WGLEventHandler * | getWGLEventHandler () const |
WGL/Win32 initialization | |
virtual bool | configInit () |
Initialize this window for the WGL window system. | |
virtual void | configExit () |
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 | destroyWGLContext (HGLRC context) |
Destroy the given WGL context. | |
virtual void | initEventHandler () |
Set up an WGLEventHandler, called by setWGLWindowHandle(). | |
virtual void | exitEventHandler () |
Destroy the WGLEventHandler, called by setWGLWindowHandle(). | |
Operations. | |
virtual void | makeCurrent () const |
virtual void | swapBuffers () |
virtual void | joinNVSwapBarrier (const uint32_t group, const uint32_t barrier) |
Join the WGL_NV_swap_group. | |
void | leaveNVSwapBarrier () |
Unbind a WGL_NV_swap_barrier. | |
virtual bool | processEvent (const WGLWindowEvent &event) |
Protected Member Functions | |
void | setWGLDC (HDC dc, const WGLDCType type) |
Set new device context and release the old DC. | |
WGLEWContext * | wglewGetContext () |
WGLPipe * | getWGLPipe () |
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... |
Equalizer default implementation of a WGL window.
Definition at line 66 of file wglWindow.h.
enum eq::WGLWindow::WGLDCType [protected] |
The type of the Win32 device context.
Definition at line 270 of file wglWindow.h.
eq::WGLWindow::WGLWindow | ( | Window * | parent | ) |
Create a new WGL window for the given eq::Window.
virtual eq::WGLWindow::~WGLWindow | ( | ) | [virtual] |
Destruct the WGL window.
virtual 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.
virtual void eq::WGLWindow::configExit | ( | ) | [virtual] |
Implements eq::SystemWindow.
virtual bool eq::WGLWindow::configInit | ( | ) | [virtual] |
Initialize this window for the WGL window system.
This method first calls initWGLAffinityDC, then chooses a pixel format with chooseWGLPixelFormat, then creates a drawable using configInitWGLDrawable and finally creates the context using createWGLContext.
Implements eq::SystemWindow.
virtual 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. |
virtual 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. |
virtual 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. |
virtual HGLRC eq::WGLWindow::createWGLContext | ( | ) | [virtual] |
Create a WGL context.
This method does not set the window's WGL context.
virtual 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.
virtual void eq::WGLWindow::destroyWGLContext | ( | HGLRC | context | ) | [virtual] |
Destroy the given WGL context.
virtual void eq::WGLWindow::exitEventHandler | ( | ) | [virtual] |
Destroy the WGLEventHandler, called by setWGLWindowHandle().
virtual void eq::WGLWindow::exitWGLAffinityDC | ( | ) | [virtual] |
Destroy the affinity device context.
virtual HDC eq::WGLWindow::getWGLAffinityDC | ( | ) | [virtual] |
virtual HGLRC eq::WGLWindow::getWGLContext | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 124 of file wglWindow.h.
virtual HDC eq::WGLWindow::getWGLDC | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 121 of file wglWindow.h.
const WGLEventHandler* eq::WGLWindow::getWGLEventHandler | ( | ) | const [inline] |
virtual HPBUFFERARB eq::WGLWindow::getWGLPBufferHandle | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 115 of file wglWindow.h.
WGLPipe* eq::WGLWindow::getWGLPipe | ( | ) | [protected] |
virtual HWND eq::WGLWindow::getWGLWindowHandle | ( | ) | const [inline, virtual] |
Implements eq::WGLWindowIF.
Definition at line 112 of file wglWindow.h.
virtual void eq::WGLWindow::initEventHandler | ( | ) | [virtual] |
Set up an WGLEventHandler, called by setWGLWindowHandle().
virtual bool eq::WGLWindow::initWGLAffinityDC | ( | ) | [virtual] |
Create, if needed, an affinity device context for this window.
virtual void eq::WGLWindow::joinNVSwapBarrier | ( | const uint32_t | group, |
const uint32_t | barrier | ||
) | [virtual] |
void eq::WGLWindow::leaveNVSwapBarrier | ( | ) |
Unbind a WGL_NV_swap_barrier.
virtual void eq::WGLWindow::makeCurrent | ( | ) | const [virtual] |
Reimplemented from eq::GLWindow.
virtual bool eq::WGLWindow::processEvent | ( | const WGLWindowEvent & | event | ) | [virtual] |
Implements eq::WGLWindowIF.
virtual 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. |
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. |
virtual 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. |
virtual 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. |
virtual void eq::WGLWindow::swapBuffers | ( | ) | [virtual] |
Implements eq::SystemWindow.
WGLEWContext* eq::WGLWindow::wglewGetContext | ( | ) | [protected] |