Equalizer default implementation of a GLX window. More...
#include <glXWindow.h>


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. | |
Equalizer default implementation of a GLX window.
Definition at line 49 of file glXWindow.h.
| 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().

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


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

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

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

| virtual GLXContext eq::GLXWindow::getGLXContext | ( | ) | const [inline, virtual] |
Implements eq::GLXWindowIF.
Definition at line 75 of file glXWindow.h.
Referenced by configExit().

| virtual XID eq::GLXWindow::getXDrawable | ( | ) | const [inline, virtual] |
Implements eq::GLXWindowIF.
Definition at line 78 of file glXWindow.h.
Referenced by configExit().

| Display * eq::GLXWindow::getXDisplay | ( | ) | [virtual] |
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().


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


| GLXContext eq::GLXWindow::createGLXContext | ( | XVisualInfo * | visualInfo | ) | [protected, virtual] |
Create a GLX context.
This method does not set the window's GLX context.
| visualInfo | the visual info for the context. |
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().


| 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
| visualInfo | the visual info for the context. |
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().


| 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
| visualInfo | the visual info for the context. |
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().


| 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
| visualInfo | the visual info for the context. |
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().


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


| 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.
| context | the GLX rendering context. |
Definition at line 568 of file glXWindow.cpp.
Referenced by configExit(), and configInit().

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


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

| void eq::GLXWindow::exitGLXEW | ( | ) | [inline, protected] |
De-initialize the GLXEW context.
Definition at line 171 of file glXWindow.h.
0.9.1 by
1.6.1