Equalizer 1.0

eq::GLXWindow Class Reference

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

#include <glXWindow.h>

Inheritance diagram for eq::GLXWindow:
Collaboration diagram for eq::GLXWindow:

List of all members.

Public Member Functions

 GLXWindow (Window *parent, Display *xDisplay=0, GLXEWContext *glxewContext=0)
 Construct a new glX/X11 system window.
virtual ~GLXWindow ()
 Destruct this glX window.
GLX/X11 initialization
virtual bool configInit ()
 Initialize this window for the glX window system.
virtual void configExit ()
virtual GLXFBConfig * chooseGLXFBConfig ()
 Choose a GLX framebuffer config based on the window's attributes.
virtual GLXContext createGLXContext (GLXFBConfig *fbConfig)
 Create a glX context.
virtual bool configInitGLXDrawable (GLXFBConfig *fbConfig)
 Initialize the window's drawable (fullscreen, pbuffer or window) and bind the glX context.
virtual bool configInitGLXWindow (GLXFBConfig *fbConfig)
 Initialize the window with a window and bind the glX context.
virtual bool configInitGLXPBuffer (GLXFBConfig *fbConfig)
 Initialize the window with a PBuffer and bind the glX context.
virtual void initEventHandler ()
 Register with the pipe's GLXEventHandler, called by setXDrawable().
virtual void exitEventHandler ()
 Deregister with the GLXEventHandler, called by setXDrawable().
Data Access.
virtual GLXContext getGLXContext () const
virtual XID getXDrawable () const
virtual Display * getXDisplay ()
GLXEWContext * glxewGetContext ()
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.
Operations.
virtual void makeCurrent () const
virtual void swapBuffers ()
virtual void joinNVSwapBarrier (const uint32_t group, const uint32_t barrier)
 Implementation untested for glX.
void leaveNVSwapBarrier ()
 Unbind a GLX_NV_swap_barrier.

Detailed Description

Equalizer default implementation of a glX window.

Definition at line 44 of file glXWindow.h.


Constructor & Destructor Documentation

eq::GLXWindow::GLXWindow ( Window parent,
Display *  xDisplay = 0,
GLXEWContext *  glxewContext = 0 
)

Construct a new glX/X11 system window.

If no display connection or no GLXEWContext is given (the default), the constructor will try to query the corresponding data from the pipe's system pipe (GLXPipe). The GLXEWContext has to be initialized.

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

Destruct this glX window.

Version:
1.0

Member Function Documentation

virtual GLXFBConfig* eq::GLXWindow::chooseGLXFBConfig ( ) [virtual]

Choose a GLX framebuffer config based on the window's attributes.

The returned FB config has to be freed using XFree().

Returns:
a pixel format, or 0 if no pixel format was found.
Version:
1.0
virtual void eq::GLXWindow::configExit ( ) [virtual]
Version:
1.0

Implements eq::SystemWindow.

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

Initialize this window for the glX window system.

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

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

Implements eq::SystemWindow.

virtual bool eq::GLXWindow::configInitGLXDrawable ( GLXFBConfig *  fbConfig) [virtual]

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

Sets the window's X11 drawable on success

Parameters:
fbConfigthe framebuffer config for the context.
Returns:
true if the drawable was created, false otherwise.
Version:
1.0
virtual bool eq::GLXWindow::configInitGLXPBuffer ( GLXFBConfig *  fbConfig) [virtual]

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

Sets the window's X11 drawable on success

Parameters:
fbConfigthe framebuffer config for the context.
Returns:
true if the PBuffer was created, false otherwise.
Version:
1.0
virtual bool eq::GLXWindow::configInitGLXWindow ( GLXFBConfig *  fbConfig) [virtual]

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

Sets the window's X11 drawable on success

Parameters:
fbConfigthe framebuffer config for the context.
Returns:
true if the window was created, false otherwise.
Version:
1.0
virtual GLXContext eq::GLXWindow::createGLXContext ( GLXFBConfig *  fbConfig) [virtual]

Create a glX context.

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

Parameters:
fbConfigthe framebuffer config for the context.
Returns:
the context, or 0 if context creation failed.
Version:
1.0
virtual void eq::GLXWindow::exitEventHandler ( ) [virtual]

Deregister with the GLXEventHandler, called by setXDrawable().

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

Implements eq::GLXWindowIF.

Definition at line 149 of file glXWindow.h.

virtual Display* eq::GLXWindow::getXDisplay ( ) [inline, virtual]
Returns:
the X11 display.
Version:
1.0

Implements eq::GLXWindowIF.

Definition at line 155 of file glXWindow.h.

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

Implements eq::GLXWindowIF.

Definition at line 152 of file glXWindow.h.

GLXEWContext* eq::GLXWindow::glxewGetContext ( ) [inline]
Returns:
the GLXEW context.
Version:
1.0

Definition at line 158 of file glXWindow.h.

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

Register with the pipe's GLXEventHandler, called by setXDrawable().

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

Implementation untested for glX.

Version:
1.0

Implements eq::SystemWindow.

void eq::GLXWindow::leaveNVSwapBarrier ( )

Unbind a GLX_NV_swap_barrier.

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

Reimplemented from eq::GLWindow.

virtual void eq::GLXWindow::setGLXContext ( GLXContext  context) [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:
contextthe glX rendering context.
Version:
1.0
virtual void eq::GLXWindow::setXDrawable ( XID  drawable) [virtual]

Set the X11 drawable ID for this window.

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

Parameters:
drawablethe X11 drawable ID.
Version:
1.0
virtual void eq::GLXWindow::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