eq::GLXWindow Class Reference

Equalizer default implementation of a GLX window. More...

#include <glXWindow.h>

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

List of all members.

Public Member Functions

 GLXWindow (Window *parent)
virtual void configExit ()
 De-initialize this OS window.
virtual void makeCurrent () const
 Make the OS window's rendering context and drawable current.
virtual void swapBuffers ()
 Swap the front and back buffer, for doublebuffered drawables.
virtual void joinNVSwapBarrier (const uint32_t group, const uint32_t barrier)
 Join a NV_swap_group.
GLX/X11 initialization



virtual bool configInit ()
 Initialize this window for the GLX window system.
virtual GLXContext getGLXContext () const
virtual XID getXDrawable () const
virtual Display * getXDisplay ()
virtual Display * getXDisplay () const
GLXEWContext * glxewGetContext ()

Protected Member Functions

virtual XVisualInfo * chooseXVisualInfo ()
 Choose a X11 visual based on the window's attributes.
virtual GLXContext createGLXContext (XVisualInfo *visualInfo)
 Create a GLX context.
virtual bool configInitGLXDrawable (XVisualInfo *visualInfo)
 Initialize the window's drawable (fullscreen, pbuffer or window) and bind the GLX context.
virtual bool configInitGLXWindow (XVisualInfo *visualInfo)
 Initialize the window with a window and bind the GLX context.
virtual bool configInitGLXPBuffer (XVisualInfo *visualInfo)
 Initialize the window with a PBuffer and bind the GLX context.
bool joinNVSwapBarrier ()
 Initialize and join a GLX_NV_swap_barrier.
void leaveNVSwapBarrier ()
 Unbind a GLX_NV_swap_barrier.
void initGLXEW ()
 Initialize the GLXEW context for this window.
void exitGLXEW ()
 De-initialize the GLXEW context.
Data Access



virtual void setXDrawable (XID drawable)
 Set the X11 drawable ID for this window.
virtual void setGLXContext (GLXContext context)
 Set the GLX rendering context for this window.

Detailed Description

Equalizer default implementation of a GLX window.

Definition at line 49 of file glXWindow.h.


Member Function Documentation

void eq::GLXWindow::configExit (  )  [virtual]

De-initialize this OS window.

This function might be called on partially or uninitialized OS windows, and the implemenation has therefore be tolerant enough to handle this case.

Implements eq::OSWindow.

Definition at line 573 of file glXWindow.cpp.

References eq::GLWindow::configExitFBO(), EQINFO, eq::GLWindow::exitGLEW(), getGLXContext(), getXDisplay(), getXDrawable(), eq::Window::IATTR_HINT_DRAWABLE, leaveNVSwapBarrier(), eq::PBUFFER, setGLXContext(), and setXDrawable().

Here is the call graph for this function:

void eq::GLXWindow::makeCurrent (  )  const [virtual]

Make the OS window's rendering context and drawable current.

This function invalidates the pipe's make current cache. If this function is not called, Pipe::setCurrent() has to be called appropriately.

Reimplemented from eq::GLWindow.

Definition at line 605 of file glXWindow.cpp.

References getXDisplay().

Referenced by configInit().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::GLXWindow::swapBuffers (  )  [virtual]

Swap the front and back buffer, for doublebuffered drawables.

Implements eq::OSWindow.

Definition at line 616 of file glXWindow.cpp.

References getXDisplay().

Here is the call graph for this function:

void eq::GLXWindow::joinNVSwapBarrier ( const uint32_t  group,
const uint32_t  barrier 
) [virtual]

Join a NV_swap_group.

See WGL or GLX implementation and OpenGL extension for details on how to implement this function.

Parameters:
group the swap group name.
barrier the swap barrier name.

Implements eq::OSWindow.

Definition at line 624 of file glXWindow.cpp.

References EQINFO, EQWARN, and getXDisplay().

Here is the call graph for this function:

bool eq::GLXWindow::configInit (  )  [virtual]

Initialize this window for the GLX window system.

This method first call chooseXVisualInfo(), then createGLXContext() with the chosen visual, and finally creates a drawable using configInitGLXDrawable().

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

Implements eq::OSWindow.

Definition at line 53 of file glXWindow.cpp.

References eq::OSWindow::_window, chooseXVisualInfo(), eq::GLWindow::configInitFBO(), configInitGLXDrawable(), createGLXContext(), eq::FBO, eq::Window::getErrorMessage(), eq::Window::IATTR_HINT_DRAWABLE, eq::GLWindow::initGLEW(), makeCurrent(), eq::Window::setErrorMessage(), and setGLXContext().

Here is the call graph for this function:

virtual GLXContext eq::GLXWindow::getGLXContext (  )  const [inline, virtual]
Returns:
the GLX rendering context.

Implements eq::GLXWindowIF.

Definition at line 75 of file glXWindow.h.

Referenced by configExit().

Here is the caller graph for this function:

virtual XID eq::GLXWindow::getXDrawable (  )  const [inline, virtual]
Returns:
the X11 drawable ID.

Implements eq::GLXWindowIF.

Definition at line 78 of file glXWindow.h.

Referenced by configExit().

Here is the caller graph for this function:

Display * eq::GLXWindow::getXDisplay (  )  [virtual]
Returns:
GLX display

Implements eq::GLXWindowIF.

Definition at line 86 of file glXWindow.cpp.

References eq::GLXPipe::getXDisplay().

Referenced by chooseXVisualInfo(), configExit(), configInitGLXPBuffer(), configInitGLXWindow(), createGLXContext(), joinNVSwapBarrier(), leaveNVSwapBarrier(), makeCurrent(), setXDrawable(), and swapBuffers().

Here is the call graph for this function:

Here is the caller graph for this function:

XVisualInfo * eq::GLXWindow::chooseXVisualInfo (  )  [protected, virtual]

Choose a X11 visual based on the window's attributes.

The returned XVisualInfo has to be freed using XFree().

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

Definition at line 113 of file glXWindow.cpp.

References eq::OSWindow::_window, eq::AUTO, EQINFO, getXDisplay(), eq::Window::IATTR_HINT_DOUBLEBUFFER, eq::Window::IATTR_HINT_DRAWABLE, 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::ON, eq::Window::setErrorMessage(), and eq::WINDOW.

Referenced by configInit().

Here is the call graph for this function:

Here is the caller graph for this function:

GLXContext eq::GLXWindow::createGLXContext ( XVisualInfo *  visualInfo  )  [protected, virtual]

Create a GLX context.

This method does not set the window's GLX context.

Parameters:
visualInfo the visual info for the context.
Returns:
the context, or 0 if context creation failed.

Definition at line 250 of file glXWindow.cpp.

References eq::OSWindow::_window, eq::GLXWindowIF::getGLXContext(), eq::Window::getOSWindow(), eq::Window::getSharedContextWindow(), getXDisplay(), 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::GLXWindow::configInitGLXDrawable ( XVisualInfo *  visualInfo  )  [protected, virtual]

Initialize the window's drawable (fullscreen, pbuffer or window) and bind the GLX context.

Sets the window's X11 drawable on success

Parameters:
visualInfo the visual info for the context.
Returns:
true if the drawable was created, false otherwise.

Definition at line 288 of file glXWindow.cpp.

References configInitGLXPBuffer(), configInitGLXWindow(), EQWARN, eq::FBO, eq::Window::IATTR_HINT_DRAWABLE, eq::PBUFFER, eq::UNDEFINED, and eq::WINDOW.

Referenced by configInit().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::GLXWindow::configInitGLXWindow ( XVisualInfo *  visualInfo  )  [protected, virtual]

Initialize the window with a window and bind the GLX context.

Sets the window's X11 drawable on success

Parameters:
visualInfo the visual info for the context.
Returns:
true if the window was created, false otherwise.

Definition at line 313 of file glXWindow.cpp.

References eq::OSWindow::_window, EQINFO, eq::Window::getPixelViewport(), getXDisplay(), eq::Window::IATTR_HINT_FULLSCREEN, eq::ON, eq::Window::setErrorMessage(), eq::Window::setPixelViewport(), and setXDrawable().

Referenced by configInitGLXDrawable().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::GLXWindow::configInitGLXPBuffer ( XVisualInfo *  visualInfo  )  [protected, virtual]

Initialize the window with a PBuffer and bind the GLX context.

Sets the window's X11 drawable on success

Parameters:
visualInfo the visual info for the context.
Returns:
true if the PBuffer was created, false otherwise.

Definition at line 432 of file glXWindow.cpp.

References eq::OSWindow::_window, EQINFO, eq::Window::getPixelViewport(), getXDisplay(), eq::Window::IATTR_HINT_DRAWABLE, eq::PBUFFER, eq::Window::setErrorMessage(), and setXDrawable().

Referenced by configInitGLXDrawable().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::GLXWindow::setXDrawable ( XID  drawable  )  [protected, virtual]

Set the X11 drawable ID for this window.

This function should only be called from configInit() or configExit().

Parameters:
drawable the X11 drawable ID.

Definition at line 513 of file glXWindow.cpp.

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

Referenced by configExit(), configInitGLXPBuffer(), and configInitGLXWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::GLXWindow::setGLXContext ( GLXContext  context  )  [protected, virtual]

Set the GLX 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 GLX rendering context.

Definition at line 568 of file glXWindow.cpp.

Referenced by configExit(), and configInit().

Here is the caller graph for this function:

bool eq::GLXWindow::joinNVSwapBarrier (  )  [protected]

Initialize and join a GLX_NV_swap_barrier.

void eq::GLXWindow::leaveNVSwapBarrier (  )  [protected]

Unbind a GLX_NV_swap_barrier.

Definition at line 683 of file glXWindow.cpp.

References getXDisplay().

Referenced by configExit().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::GLXWindow::initGLXEW (  )  [protected]

Initialize the GLXEW context for this window.

Definition at line 700 of file glXWindow.cpp.

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

Here is the call graph for this function:

void eq::GLXWindow::exitGLXEW (  )  [inline, protected]

De-initialize the GLXEW context.

Definition at line 171 of file glXWindow.h.


The documentation for this class was generated from the following files:
Generated on Sat Feb 6 13:05:05 2010 for Equalizer 0.9.1 by  doxygen 1.6.1