Equalizer
1.2.1
|
Equalizer default implementation of an AGL window interface. More...
#include <window.h>
Public Member Functions | |
Window (eq::Window *parent, CGDirectDisplayID displayID=0) | |
Create a new AGL window for the given eq::Window. | |
virtual | ~Window () |
Destruct the AGL window. | |
Data Access | |
virtual void | setAGLContext (AGLContext context) |
Set the AGL rendering context for this window. | |
virtual void | setCarbonWindow (WindowRef window) |
Set the carbon window to be used with the current AGL context. | |
virtual void | setAGLPBuffer (AGLPbuffer pbuffer) |
Set the AGL PBuffer object to be used with the current AGL context. | |
virtual AGLContext | getAGLContext () const |
virtual WindowRef | getCarbonWindow () const |
virtual AGLPbuffer | getAGLPBuffer () const |
CGDirectDisplayID | getCGDisplayID () const |
AGL/Carbon initialization | |
virtual bool | configInit () |
Initialize this window for the AGL window system. | |
virtual void | configExit () |
virtual AGLPixelFormat | chooseAGLPixelFormat () |
Choose a pixel format based on the window's attributes. | |
virtual void | destroyAGLPixelFormat (AGLPixelFormat format) |
Destroy a pixel format obtained with chooseAGLPixelFormat(). | |
virtual AGLContext | createAGLContext (AGLPixelFormat format) |
Create an AGL context. | |
virtual bool | configInitAGLDrawable () |
Initialize the window's drawable (fullscreen, pbuffer or window) and bind the AGL context. | |
virtual bool | configInitAGLFullscreen () |
Initialize the window with a fullscreen Carbon window. | |
virtual bool | configInitAGLWindow () |
Initialize the window with a normal Carbon window. | |
virtual bool | configInitAGLPBuffer () |
Initialize the window with an offscreen AGL PBuffer. | |
virtual void | initEventHandler () |
Set up an AGLEventHandler, called by setCarbonWindow(). | |
virtual void | exitEventHandler () |
Destroy the AGLEventHandler, called by setCarbonWindow(). | |
Operations. | |
virtual void | makeCurrent () const |
virtual void | swapBuffers () |
virtual void | joinNVSwapBarrier (const uint32_t group, const uint32_t barrier) |
Not implemented for AGL. | |
virtual bool | processEvent (const WindowEvent &event) |
Equalizer default implementation of an AGL window interface.
Definition at line 57 of file include/eq/client/agl/window.h.
eq::agl::Window::Window | ( | eq::Window * | parent, |
CGDirectDisplayID | displayID = 0 |
||
) |
Create a new AGL window for the given eq::Window.
If kCGNullDirectDisplay is specified as the displayID (the default), the constructor will try to query the corresponding data from the pipe's system pipe (agl::Pipe).
virtual eq::agl::Window::~Window | ( | ) | [virtual] |
Destruct the AGL window.
virtual AGLPixelFormat eq::agl::Window::chooseAGLPixelFormat | ( | ) | [virtual] |
Choose a pixel format based on the window's attributes.
The returned pixel format has to be destroyed using destroyAGLPixelFormat() to avoid memory leaks.
This method uses Global::enterCarbon() and Global::leaveCarbon() to protect the calls to AGL/Carbon.
virtual void eq::agl::Window::configExit | ( | ) | [virtual] |
Implements eq::SystemWindow.
virtual bool eq::agl::Window::configInit | ( | ) | [virtual] |
Initialize this window for the AGL window system.
This method first call chooseAGLPixelFormat(), then createAGLContext() with the chosen pixel format, destroys the pixel format using destroyAGLPixelFormat() and finally creates a drawable using configInitAGLDrawable().
Implements eq::SystemWindow.
virtual bool eq::agl::Window::configInitAGLDrawable | ( | ) | [virtual] |
Initialize the window's drawable (fullscreen, pbuffer or window) and bind the AGL context.
Sets the window's carbon window on success. Calls configInitAGLFullscreen() or configInitAGLWindow().
virtual bool eq::agl::Window::configInitAGLFullscreen | ( | ) | [virtual] |
Initialize the window with a fullscreen Carbon window.
Sets the window's carbon window on success.
This method uses Global::enterCarbon() and Global::leaveCarbon() to protect the calls to AGL/Carbon.
virtual bool eq::agl::Window::configInitAGLPBuffer | ( | ) | [virtual] |
Initialize the window with an offscreen AGL PBuffer.
Sets the window's AGL PBuffer on success.
virtual bool eq::agl::Window::configInitAGLWindow | ( | ) | [virtual] |
Initialize the window with a normal Carbon window.
Sets the window's carbon window on success.
This method uses Global::enterCarbon() and Global::leaveCarbon() to protect the calls to AGL/Carbon.
virtual AGLContext eq::agl::Window::createAGLContext | ( | AGLPixelFormat | format | ) | [virtual] |
Create an AGL context.
This method does not set the window's AGL context.
This method uses Global::enterCarbon() and Global::leaveCarbon() to protect the calls to AGL/Carbon.
format | the pixel format for the context. |
virtual void eq::agl::Window::destroyAGLPixelFormat | ( | AGLPixelFormat | format | ) | [virtual] |
Destroy a pixel format obtained with chooseAGLPixelFormat().
This method uses Global::enterCarbon() and Global::leaveCarbon() to protect the calls to AGL/Carbon.
format | a pixel format. |
virtual void eq::agl::Window::exitEventHandler | ( | ) | [virtual] |
Destroy the AGLEventHandler, called by setCarbonWindow().
virtual AGLContext eq::agl::Window::getAGLContext | ( | ) | const [inline, virtual] |
Implements eq::agl::WindowIF.
Definition at line 103 of file include/eq/client/agl/window.h.
virtual AGLPbuffer eq::agl::Window::getAGLPBuffer | ( | ) | const [inline, virtual] |
Implements eq::agl::WindowIF.
Definition at line 109 of file include/eq/client/agl/window.h.
virtual WindowRef eq::agl::Window::getCarbonWindow | ( | ) | const [inline, virtual] |
Implements eq::agl::WindowIF.
Definition at line 106 of file include/eq/client/agl/window.h.
CGDirectDisplayID eq::agl::Window::getCGDisplayID | ( | ) | const [inline] |
Definition at line 112 of file include/eq/client/agl/window.h.
virtual void eq::agl::Window::initEventHandler | ( | ) | [virtual] |
Set up an AGLEventHandler, called by setCarbonWindow().
virtual void eq::agl::Window::joinNVSwapBarrier | ( | const uint32_t | group, |
const uint32_t | barrier | ||
) | [virtual] |
virtual void eq::agl::Window::makeCurrent | ( | ) | const [virtual] |
Reimplemented from eq::GLWindow.
virtual bool eq::agl::Window::processEvent | ( | const WindowEvent & | event | ) | [virtual] |
Implements eq::agl::WindowIF.
virtual void eq::agl::Window::setAGLContext | ( | AGLContext | context | ) | [virtual] |
Set the AGL 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 AGL rendering context. |
virtual void eq::agl::Window::setAGLPBuffer | ( | AGLPbuffer | pbuffer | ) | [virtual] |
Set the AGL PBuffer object to be used with the current AGL context.
pbuffer | the PBuffer. |
virtual void eq::agl::Window::setCarbonWindow | ( | WindowRef | window | ) | [virtual] |
Set the carbon window to be used with the current AGL context.
window | the window reference. |
virtual void eq::agl::Window::swapBuffers | ( | ) | [virtual] |
Implements eq::SystemWindow.