eq::GLXWindow Class Reference

#include <glXWindow.h>

Inheritance diagram for eq::GLXWindow:

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

Collaboration graph
[legend]

List of all members.


Detailed Description

Equalizer default implementation of a GLX window.

Definition at line 31 of file glXWindow.h.


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.

Public Member Functions

 GLXWindow (Window *parent)
virtual void configExit ()
virtual void makeCurrent () const
virtual void swapBuffers ()
virtual bool configInit ()
 Initialize this window for the GLX window system.
virtual GLXContext getGLXContext () const
virtual XID getXDrawable () const

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.

Member Function Documentation

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 34 of file glXWindow.cpp.

References eq::OSWindow::_window, chooseXVisualInfo(), configInitGLXDrawable(), createGLXContext(), 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 57 of file glXWindow.h.

Referenced by createGLXContext().

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 60 of file glXWindow.h.

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 61 of file glXWindow.cpp.

References eq::OSWindow::_window, eq::Pipe::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, and eq::Window::setErrorMessage().

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 197 of file glXWindow.cpp.

References eq::OSWindow::_window, getGLXContext(), eq::Window::getOSWindow(), eq::Window::getSharedContextWindow(), eq::Pipe::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 236 of file glXWindow.cpp.

References configInitGLXPBuffer(), configInitGLXWindow(), and eq::Window::IATTR_HINT_DRAWABLE.

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 254 of file glXWindow.cpp.

References eq::OSWindow::_window, eq::Window::getName(), eq::Window::getPixelViewport(), eq::Pipe::getXDisplay(), eq::PixelViewport::h, eq::Window::IATTR_HINT_DECORATION, eq::Window::IATTR_HINT_DRAWABLE, eq::Window::IATTR_HINT_FULLSCREEN, eq::Window::setErrorMessage(), eq::Window::setPixelViewport(), setXDrawable(), eq::PixelViewport::w, eq::PixelViewport::x, and eq::PixelViewport::y.

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 354 of file glXWindow.cpp.

References eq::OSWindow::_window, eq::Window::getPixelViewport(), eq::Pipe::getXDisplay(), eq::PixelViewport::h, eq::Window::IATTR_HINT_DRAWABLE, eq::Window::setErrorMessage(), setXDrawable(), and eq::PixelViewport::w.

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 438 of file glXWindow.cpp.

References eq::OSWindow::_window, eq::Pipe::getXDisplay(), eq::PixelViewport::h, eq::Window::IATTR_HINT_DRAWABLE, eq::Window::setPixelViewport(), eq::PixelViewport::w, eq::PixelViewport::x, and eq::PixelViewport::y.

Referenced by 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 496 of file glXWindow.cpp.

Referenced by configInit().

Here is the caller graph for this function:


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