Equalizer  1.12.0
Parallel Rendering Framework
eq::glx::Window Class Reference

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

#include <window.h>

+ Inheritance diagram for eq::glx::Window:
+ Collaboration diagram for eq::glx::Window:

Public Member Functions

 Window (NotifierInterface &parent, const WindowSettings &settings, Display *xDisplay, const GLXEWContext *glxewContext, MessagePump *messagePump)
 Construct a new glX/X11 system window. More...
 
virtual ~Window ()
 Destruct this glX window. More...
 
GLX/X11 initialization
bool configInit () override
 Initialize this window for the glX window system. More...
 
void configExit () override
 
virtual GLXFBConfig * chooseGLXFBConfig ()
 Choose a GLX framebuffer config based on the window's attributes. More...
 
virtual GLXContext createGLXContext (GLXFBConfig *fbConfig)
 Create a glX context. More...
 
virtual bool configInitGLXDrawable (GLXFBConfig *fbConfig)
 Initialize the window's drawable (fullscreen, pbuffer or window) and bind the glX context. More...
 
virtual bool configInitGLXWindow (GLXFBConfig *fbConfig)
 Initialize the window with a window and bind the glX context. More...
 
virtual bool configInitGLXPBuffer (GLXFBConfig *fbConfig)
 Initialize the window with a PBuffer and bind the glX context. More...
 
virtual EQ_API void initEventHandler ()
 Register with the pipe's GLXEventHandler, called by setXDrawable(). More...
 
virtual EQ_API void exitEventHandler ()
 Deregister with the GLXEventHandler, called by setXDrawable(). More...
 
Data Access.
EQ_API GLXContext getGLXContext () const override
 
EQ_API XID getXDrawable () const override
 
EQ_API Display * getXDisplay () override
 
EQ_API const GLXEWContext * glxewGetContext () const
 
virtual void setXDrawable (XID drawable)
 Set the X11 drawable ID for this window. More...
 
virtual void setGLXContext (GLXContext context)
 Set the glX rendering context for this window. More...
 
Operations.
void makeCurrent (const bool cache=true) const override
 
void doneCurrent () const override
 
void swapBuffers () override
 
void joinNVSwapBarrier (const uint32_t group, const uint32_t barrier) override
 Implementation untested for glX. More...
 
void leaveNVSwapBarrier ()
 Unbind a GLX_NV_swap_barrier. More...
 
EQ_API bool processEvent (const WindowEvent &event) override
 
- Public Member Functions inherited from eq::glx::WindowIF
 WindowIF (NotifierInterface &parent, const WindowSettings &settings)
 
- Public Member Functions inherited from eq::GLWindow
EQ_API GLWindow (NotifierInterface &parent, const WindowSettings &settings)
 Construct a new OpenGL window. More...
 
virtual EQ_API ~GLWindow ()
 Destruct a new OpenGL window. More...
 
EQ_API bool isCurrent () const
 
virtual EQ_API void initGLEW ()
 Initialize the GLEW context for this window. More...
 
virtual EQ_API void exitGLEW ()
 De-initialize the GLEW context. More...
 
EQ_API const GLEWContext * glewGetContext () const override
 Get the GLEW context for this window. More...
 
EQ_API void queryDrawableConfig (DrawableConfig &) override
 Set up the drawable config by querying the current context. More...
 
EQ_API void bindFrameBuffer () const override
 Bind the window's FBO, if it uses an FBO drawable. More...
 
EQ_API void bindDrawFrameBuffer () const override
 Bind the window's draw FBO, used for multisampling. More...
 
EQ_API void updateFrameBuffer () const override
 Update the window's FBO from the multisampled FBO. More...
 
EQ_API void flush () override
 Flush all command buffers. More...
 
EQ_API void finish () override
 Finish execution of all commands. More...
 
virtual EQ_API bool configInitFBO ()
 Build and initialize the FBO. More...
 
virtual EQ_API void configExitFBO ()
 Destroy the FBO. More...
 
EQ_API const util::FrameBufferObjectgetFrameBufferObject () const override
 
EQ_API util::FrameBufferObjectgetFrameBufferObject () override
 
- Public Member Functions inherited from eq::SystemWindow
EQ_API SystemWindow (NotifierInterface &parent, const WindowSettings &settings)
 Create a new SystemWindow for the given eq::Window. More...
 
virtual EQ_API ~SystemWindow ()
 Destroy the SystemWindow. More...
 
EQ_API EventOCommand sendError (const uint32_t error)
 Send a window error event to the application node. More...
 
virtual EQ_API bool processEvent (const Event &event)
 Process an event. More...
 
EQ_API void setPixelViewport (const PixelViewport &pvp)
 Set the window's pixel viewport wrt its parent pipe. More...
 
EQ_API const PixelViewport & getPixelViewport () const
 
EQ_API uint32_t getColorFormat () const
 
EQ_API void setName (const std::string &name)
 Set the window's name. More...
 
EQ_API const std::string & getName () const
 
EQ_API int32_t getIAttribute (const WindowSettings::IAttribute attr) const
 
EQ_API const SystemWindowgetSharedContextWindow () const
 

Detailed Description

Equalizer default implementation of a glX window.

Definition at line 57 of file glx/window.h.

Constructor & Destructor Documentation

eq::glx::Window::Window ( NotifierInterface parent,
const WindowSettings settings,
Display *  xDisplay,
const GLXEWContext *  glxewContext,
MessagePump messagePump 
)

Construct a new glX/X11 system window.

Version
1.7.2
virtual eq::glx::Window::~Window ( )
virtual

Destruct this glX window.

Version
1.0

Member Function Documentation

virtual GLXFBConfig* eq::glx::Window::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
void eq::glx::Window::configExit ( )
overridevirtual
Version
1.0

Implements eq::SystemWindow.

bool eq::glx::Window::configInit ( )
overridevirtual

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::glx::Window::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::glx::Window::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::glx::Window::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::glx::Window::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
void eq::glx::Window::doneCurrent ( ) const
overridevirtual
Version
1.10

Reimplemented from eq::GLWindow.

virtual EQ_API void eq::glx::Window::exitEventHandler ( )
virtual

Deregister with the GLXEventHandler, called by setXDrawable().

Version
1.0
EQ_API GLXContext eq::glx::Window::getGLXContext ( ) const
overridevirtual
Returns
the glX rendering context.
Version
1.0

Implements eq::glx::WindowIF.

EQ_API Display* eq::glx::Window::getXDisplay ( )
overridevirtual
Returns
the X11 display.
Version
1.0

Implements eq::glx::WindowIF.

EQ_API XID eq::glx::Window::getXDrawable ( ) const
overridevirtual
Returns
the X11 drawable ID.
Version
1.0

Implements eq::glx::WindowIF.

EQ_API const GLXEWContext* eq::glx::Window::glxewGetContext ( ) const
Returns
the GLXEW context.
Version
1.0
virtual EQ_API void eq::glx::Window::initEventHandler ( )
virtual

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

Version
1.0
void eq::glx::Window::joinNVSwapBarrier ( const uint32_t  group,
const uint32_t  barrier 
)
overridevirtual

Implementation untested for glX.

Version
1.0

Implements eq::SystemWindow.

void eq::glx::Window::leaveNVSwapBarrier ( )

Unbind a GLX_NV_swap_barrier.

Version
1.0
void eq::glx::Window::makeCurrent ( const bool  cache = true) const
overridevirtual
Version
1.0

Reimplemented from eq::GLWindow.

EQ_API bool eq::glx::Window::processEvent ( const WindowEvent event)
overridevirtual
Version
1.5.1

Implements eq::glx::WindowIF.

virtual void eq::glx::Window::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::glx::Window::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
void eq::glx::Window::swapBuffers ( )
overridevirtual
Version
1.0

Implements eq::SystemWindow.


The documentation for this class was generated from the following file: