eq::AGLWindow Class Reference

#include <aglWindow.h>

Inheritance diagram for eq::AGLWindow:

Inheritance graph
[legend]
Collaboration diagram for eq::AGLWindow:

Collaboration graph
[legend]

List of all members.


Detailed Description

Equalizer default implementation of an AGL window.

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::SpinLockgetContextLock ()
virtual AGLContext getAGLContext () const
virtual WindowRef getCarbonWindow () const
virtual AGLPbuffer getAGLPBuffer () const

Member Function Documentation

virtual AGLContext eq::AGLWindow::getAGLContext (  )  const [inline, virtual]

Returns:
the AGL rendering context.

Implements eq::AGLWindowIF.

Definition at line 56 of file aglWindow.h.

Referenced by configInitAGLFullscreen(), configInitAGLPBuffer(), configInitAGLWindow(), and createAGLContext().

Here is the caller graph for this function:

virtual WindowRef eq::AGLWindow::getCarbonWindow (  )  const [inline, virtual]

Returns:
the carbon window reference.

Implements eq::AGLWindowIF.

Definition at line 59 of file aglWindow.h.

virtual AGLPbuffer eq::AGLWindow::getAGLPBuffer (  )  const [inline, virtual]

Returns:
the AGL PBuffer object.

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.

Parameters:
context the AGL rendering context.

Definition at line 82 of file aglWindow.cpp.

Referenced by configInit().

Here is the caller graph for this function:

void eq::AGLWindow::setCarbonWindow ( WindowRef  window  )  [virtual]

Set the carbon window to be used with the current AGL context.

Parameters:
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::AGLWindow::setAGLPBuffer ( AGLPbuffer  pbuffer  )  [virtual]

Set the AGL PBUffer object to be used with the current AGL context.

Parameters:
pbuffer the PBuffer.

Definition at line 508 of file aglWindow.cpp.

References eq::OSWindow::_window, and eq::Window::setPixelViewport().

Referenced by configInitAGLPBuffer().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Returns:
true if the initialization was successful, false otherwise.

Implements eq::OSWindow.

Definition at line 91 of file aglWindow.cpp.

References chooseAGLPixelFormat(), configInitAGLDrawable(), createAGLContext(), destroyAGLPixelFormat(), and setAGLContext().

Here is the call graph for this function:

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.

Returns:
a pixel format, or 0 if no pixel format was found.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
pixelFormat a pixel format.

Definition at line 268 of file aglWindow.cpp.

References eq::Global::enterCarbon(), and eq::Global::leaveCarbon().

Referenced by configInit().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
pixelFormat the pixel format for the context.
Returns:
the context, or 0 if context creation failed.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Returns:
true if the drawable was created, false otherwise.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
true if the window was created, false otherwise.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
true if the window was created, false otherwise.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::AGLWindow::configInitAGLPBuffer (  )  [virtual]

Initialize the window with an offscreen AGL PBuffer.

Sets the window's AGL PBuffer on success.

Returns:
true if the PBuffer was created, false otherwise.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sat Dec 6 12:01:42 2008 for Equalizer 0.6 by  doxygen 1.5.5