#include <aglWindow.h>


Definition at line 43 of file aglWindow.h.
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 bool | configInit () |
| Initialize this window for the AGL window system. | |
| virtual AGLPixelFormat | chooseAGLPixelFormat () |
| Choose a pixel format based on the window's attributes. | |
| virtual void | destroyAGLPixelFormat (AGLPixelFormat pixelFormat) |
| Destroy a pixel format obtained with chooseAGLPixelFormat(). | |
| virtual AGLContext | createAGLContext (AGLPixelFormat pixelFormat) |
| 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 () |
| virtual void | exitEventHandler () |
| virtual bool | processEvent (const AGLWindowEvent &event) |
| Process an event. | |
Public Member Functions | |
| AGLWindow (Window *parent) | |
| virtual void | configExit () |
| virtual void | makeCurrent () const |
| virtual void | swapBuffers () |
| virtual base::SpinLock * | getContextLock () |
| virtual AGLContext | getAGLContext () const |
| virtual WindowRef | getCarbonWindow () const |
| virtual AGLPbuffer | getAGLPBuffer () const |
| virtual AGLContext eq::AGLWindow::getAGLContext | ( | ) | const [inline, virtual] |
Implements eq::AGLWindowIF.
Definition at line 56 of file aglWindow.h.
Referenced by configInitAGLFullscreen(), configInitAGLPBuffer(), configInitAGLWindow(), and createAGLContext().

| virtual WindowRef eq::AGLWindow::getCarbonWindow | ( | ) | const [inline, virtual] |
Implements eq::AGLWindowIF.
Definition at line 59 of file aglWindow.h.
| virtual AGLPbuffer eq::AGLWindow::getAGLPBuffer | ( | ) | const [inline, virtual] |
Implements eq::AGLWindowIF.
Definition at line 62 of file aglWindow.h.
| void eq::AGLWindow::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. |
Definition at line 82 of file aglWindow.cpp.
Referenced by configInit().

| void eq::AGLWindow::setCarbonWindow | ( | WindowRef | window | ) | [virtual] |
Set the carbon window to be used with the current AGL context.
| window | the window reference. |
Definition at line 477 of file aglWindow.cpp.
References eq::OSWindow::_window, eq::Global::enterCarbon(), eq::PixelViewport::h, eq::Global::leaveCarbon(), eq::Window::setPixelViewport(), eq::PixelViewport::w, eq::PixelViewport::x, and eq::PixelViewport::y.
Referenced by configInitAGLWindow().


| void eq::AGLWindow::setAGLPBuffer | ( | AGLPbuffer | pbuffer | ) | [virtual] |
Set the AGL PBUffer object to be used with the current AGL context.
| pbuffer | the PBuffer. |
Definition at line 508 of file aglWindow.cpp.
References eq::OSWindow::_window, and eq::Window::setPixelViewport().
Referenced by configInitAGLPBuffer().


| bool eq::AGLWindow::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::OSWindow.
Definition at line 91 of file aglWindow.cpp.
References chooseAGLPixelFormat(), configInitAGLDrawable(), createAGLContext(), destroyAGLPixelFormat(), and setAGLContext().

| AGLPixelFormat eq::AGLWindow::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.
Definition at line 108 of file aglWindow.cpp.
References eq::OSWindow::_window, eq::Global::enterCarbon(), eq::Pipe::getCGDisplayID(), eq::Window::IATTR_HINT_DOUBLEBUFFER, eq::Window::IATTR_HINT_DRAWABLE, eq::Window::IATTR_HINT_FULLSCREEN, 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::Global::leaveCarbon(), and eq::Window::setErrorMessage().
Referenced by configInit().


| void eq::AGLWindow::destroyAGLPixelFormat | ( | AGLPixelFormat | pixelFormat | ) | [virtual] |
Destroy a pixel format obtained with chooseAGLPixelFormat().
This method uses Global::enterCarbon() and Global::leaveCarbon() to protect the calls to AGL/Carbon.
| pixelFormat | a pixel format. |
Definition at line 268 of file aglWindow.cpp.
References eq::Global::enterCarbon(), and eq::Global::leaveCarbon().
Referenced by configInit().


| AGLContext eq::AGLWindow::createAGLContext | ( | AGLPixelFormat | pixelFormat | ) | [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.
| pixelFormat | the pixel format for the context. |
Definition at line 278 of file aglWindow.cpp.
References eq::OSWindow::_window, eq::Global::enterCarbon(), getAGLContext(), eq::Window::getOSWindow(), eq::Window::getSharedContextWindow(), eq::Window::IATTR_HINT_SWAPSYNC, eq::Global::leaveCarbon(), and eq::Window::setErrorMessage().
Referenced by configInit().


| bool eq::AGLWindow::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().
Definition at line 326 of file aglWindow.cpp.
References configInitAGLFullscreen(), configInitAGLPBuffer(), configInitAGLWindow(), eq::Window::IATTR_HINT_DRAWABLE, and eq::Window::IATTR_HINT_FULLSCREEN.
Referenced by configInit().


| bool eq::AGLWindow::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.
Definition at line 366 of file aglWindow.cpp.
References eq::OSWindow::_window, eq::Global::enterCarbon(), getAGLContext(), eq::Window::getPixelViewport(), eq::Pipe::getPixelViewport(), eq::PixelViewport::h, eq::PixelViewport::isValid(), eq::Global::leaveCarbon(), eq::Window::setErrorMessage(), eq::Window::setPixelViewport(), and eq::PixelViewport::w.
Referenced by configInitAGLDrawable().


| bool eq::AGLWindow::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.
Definition at line 400 of file aglWindow.cpp.
References eq::OSWindow::_window, eq::Global::enterCarbon(), getAGLContext(), eq::Window::getName(), eq::Window::getPixelViewport(), eq::PixelViewport::h, eq::Window::IATTR_HINT_DECORATION, eq::Global::leaveCarbon(), setCarbonWindow(), eq::Window::setErrorMessage(), eq::PixelViewport::w, eq::PixelViewport::x, and eq::PixelViewport::y.
Referenced by configInitAGLDrawable().


| bool eq::AGLWindow::configInitAGLPBuffer | ( | ) | [virtual] |
Initialize the window with an offscreen AGL PBuffer.
Sets the window's AGL PBuffer on success.
Definition at line 336 of file aglWindow.cpp.
References eq::OSWindow::_window, getAGLContext(), eq::Window::getPixelViewport(), eq::PixelViewport::h, setAGLPBuffer(), eq::Window::setErrorMessage(), and eq::PixelViewport::w.
Referenced by configInitAGLDrawable().


| bool eq::AGLWindow::processEvent | ( | const AGLWindowEvent & | event | ) | [virtual] |
Process an event.
Reimplemented from eq::AGLWindowIF.
Definition at line 74 of file aglWindow.cpp.
References eq::AGLWindowIF::processEvent().

0.6 by
1.5.5