Equalizer 1.0

eq::AGLWindow Class Reference

Equalizer default implementation of an AGL window interface. More...

#include <aglWindow.h>

Inheritance diagram for eq::AGLWindow:
Collaboration diagram for eq::AGLWindow:

List of all members.

Public Member Functions

 AGLWindow (Window *parent, CGDirectDisplayID displayID=0)
 Create a new AGL window for the given eq::Window.
virtual ~AGLWindow ()
 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
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 AGLWindowEvent &event)

Detailed Description

Equalizer default implementation of an AGL window interface.

Definition at line 58 of file aglWindow.h.


Constructor & Destructor Documentation

eq::AGLWindow::AGLWindow ( 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 (AGLPipe).

Version:
1.0
virtual eq::AGLWindow::~AGLWindow ( ) [virtual]

Destruct the AGL window.

Version:
1.0

Member Function Documentation

virtual 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.
Version:
1.0
virtual void eq::AGLWindow::configExit ( ) [virtual]
Version:
1.0

Implements eq::SystemWindow.

virtual 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.
Version:
1.0

Implements eq::SystemWindow.

virtual 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.
Version:
1.0
virtual 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.
Version:
1.0
virtual 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.
Version:
1.0
virtual 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.
Version:
1.0
virtual AGLContext eq::AGLWindow::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.

Parameters:
formatthe pixel format for the context.
Returns:
the context, or 0 if context creation failed.
Version:
1.0
virtual void eq::AGLWindow::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.

Parameters:
formata pixel format.
Version:
1.0
virtual void eq::AGLWindow::exitEventHandler ( ) [virtual]

Destroy the AGLEventHandler, called by setCarbonWindow().

Version:
1.0
virtual AGLContext eq::AGLWindow::getAGLContext ( ) const [inline, virtual]
Returns:
the AGL rendering context.
Version:
1.0

Implements eq::AGLWindowIF.

Definition at line 104 of file aglWindow.h.

virtual AGLPbuffer eq::AGLWindow::getAGLPBuffer ( ) const [inline, virtual]
Returns:
the AGL PBuffer object.
Version:
1.0

Implements eq::AGLWindowIF.

Definition at line 110 of file aglWindow.h.

virtual WindowRef eq::AGLWindow::getCarbonWindow ( ) const [inline, virtual]
Returns:
the carbon window reference.
Version:
1.0

Implements eq::AGLWindowIF.

Definition at line 107 of file aglWindow.h.

virtual void eq::AGLWindow::initEventHandler ( ) [virtual]

Set up an AGLEventHandler, called by setCarbonWindow().

Version:
1.0
virtual void eq::AGLWindow::joinNVSwapBarrier ( const uint32_t  group,
const uint32_t  barrier 
) [virtual]

Not implemented for AGL.

Version:
1.0

Implements eq::SystemWindow.

virtual void eq::AGLWindow::makeCurrent ( ) const [virtual]
Version:
1.0

Reimplemented from eq::GLWindow.

virtual bool eq::AGLWindow::processEvent ( const AGLWindowEvent event) [virtual]
Version:
1.0

Implements eq::AGLWindowIF.

virtual 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:
contextthe AGL rendering context.
Version:
1.0
virtual void eq::AGLWindow::setAGLPBuffer ( AGLPbuffer  pbuffer) [virtual]

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

Parameters:
pbufferthe PBuffer.
Version:
1.0
virtual void eq::AGLWindow::setCarbonWindow ( WindowRef  window) [virtual]

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

Parameters:
windowthe window reference.
Version:
1.0
virtual void eq::AGLWindow::swapBuffers ( ) [virtual]
Version:
1.0

Implements eq::SystemWindow.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3