Equalizer
2.1.0
Parallel Rendering Framework
|
The interface definition for system-specific windowing code. More...
#include <systemWindow.h>
Public Member Functions | |
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... | |
virtual EQ_API void | queryDrawableConfig (DrawableConfig &dc)=0 |
Set up the given drawable based on the current context. More... | |
virtual const GLEWContext * | glewGetContext () const |
Get the GLEW context for this window. More... | |
EQ_API EventOCommand | sendError (const uint32_t error) |
Send a window error event to the application node. More... | |
EQ_API bool | processEvent (EventType type) |
Process a stateless event. More... | |
EQ_API bool | processEvent (EventType type, SizeEvent &event) |
Process a (re)size event. More... | |
EQ_API bool | processEvent (EventType type, PointerEvent &event) |
Process a mouse event. More... | |
EQ_API bool | processEvent (EventType type, KeyEvent &event) |
Process a keyboard event. More... | |
EQ_API bool | processEvent (AxisEvent &event) |
Process an axis event. More... | |
EQ_API bool | processEvent (ButtonEvent &event) |
Process a button 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 |
virtual EQ_API void | resize (const PixelViewport &pvp)=0 |
Resize the underlying frame buffer to the given size. More... | |
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 SystemWindow * | getSharedContextWindow () const |
Methods forwarded from eq::Window | |
virtual EQ_API bool | configInit ()=0 |
Initialize this system window. More... | |
virtual EQ_API void | configExit ()=0 |
De-initialize this system window. More... | |
virtual EQ_API void | makeCurrent (const bool cache=true) const =0 |
Make the system window rendering context and drawable current. More... | |
virtual EQ_API void | doneCurrent () const =0 |
This results in no context being current in the current thread. More... | |
virtual EQ_API void | bindFrameBuffer () const =0 |
Bind the window's FBO, if it uses an FBO drawable. More... | |
virtual EQ_API void | bindDrawFrameBuffer () const =0 |
Bind the window's draw FBO, used for multisampling. More... | |
virtual EQ_API void | updateFrameBuffer () const =0 |
Update the window's FBO from the multisampled FBO. More... | |
virtual EQ_API void | swapBuffers ()=0 |
Swap the front and back buffer. More... | |
virtual EQ_API void | flush ()=0 |
Flush all command buffers. More... | |
virtual EQ_API void | finish ()=0 |
Finish execution of all commands. More... | |
virtual EQ_API void | joinNVSwapBarrier (const uint32_t group, const uint32_t barrier)=0 |
Join a NV_swap_group. More... | |
Frame Buffer Object support. | |
virtual const util::FrameBufferObject * | getFrameBufferObject () const |
virtual util::FrameBufferObject * | getFrameBufferObject () |
The interface definition for system-specific windowing code.
The system window abstracts all window system specific code and facilitates porting to new windowing systems. Each eq::Window uses one eq::SystemWindow, which is created and initialized in Window::configInitSystemWindow.
Definition at line 35 of file systemWindow.h.
EQ_API eq::SystemWindow::SystemWindow | ( | NotifierInterface & | parent, |
const WindowSettings & | settings | ||
) |
Create a new SystemWindow for the given eq::Window.
|
virtual |
Destroy the SystemWindow.
|
pure virtual |
Bind the window's draw FBO, used for multisampling.
Implemented in eq::GLWindow, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
Bind the window's FBO, if it uses an FBO drawable.
Implemented in eq::GLWindow, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
De-initialize this system window.
This function might be called on partially or uninitialized system windows, and the implemenation has therefore be tolerant enough to handle this case.
Implemented in eq::wgl::Window, eq::glx::Window, eq::qt::Window, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
Initialize this system window.
This method should take into account all attributes of the parent Window.
Implemented in eq::wgl::Window, eq::glx::Window, eq::qt::Window, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
This results in no context being current in the current thread.
This function resets the pipe's make current cache.
Implemented in eq::wgl::Window, eq::glx::Window, eq::qt::Window, eq::GLWindow, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
Finish execution of all commands.
Implemented in eq::GLWindow, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
Flush all command buffers.
Implemented in eq::GLWindow, eq::qt::ShareContextWindow, and eq::x11::Window.
|
inlinevirtual |
Reimplemented in eq::GLWindow.
Definition at line 119 of file systemWindow.h.
|
inlinevirtual |
Reimplemented in eq::GLWindow.
Definition at line 124 of file systemWindow.h.
References queryDrawableConfig().
EQ_API int32_t eq::SystemWindow::getIAttribute | ( | const WindowSettings::IAttribute | attr | ) | const |
Referenced by glewGetContext().
EQ_API const std::string& eq::SystemWindow::getName | ( | ) | const |
Referenced by glewGetContext().
EQ_API const PixelViewport& eq::SystemWindow::getPixelViewport | ( | ) | const |
Referenced by glewGetContext().
EQ_API const SystemWindow* eq::SystemWindow::getSharedContextWindow | ( | ) | const |
Referenced by glewGetContext().
|
inlinevirtual |
Get the GLEW context for this window.
The glew context is initialized during window initialization, and provides access to OpenGL extensions. This function does not follow the Equalizer naming conventions, since GLEW uses a function of this name to automatically resolve OpenGL function entry points. Therefore, any supported GL function can be called directly from an initialized SystemWindow.
Reimplemented in eq::GLWindow.
Definition at line 147 of file systemWindow.h.
References getIAttribute(), getName(), getPixelViewport(), getSharedContextWindow(), processEvent(), resize(), sendError(), setName(), and setPixelViewport().
|
pure 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. |
Implemented in eq::wgl::Window, eq::glx::Window, eq::qt::Window, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
Make the system window rendering context and drawable current.
This function invalidates the pipe's make current cache.
Implemented in eq::wgl::Window, eq::glx::Window, eq::qt::Window, eq::qt::ShareContextWindow, eq::GLWindow, and eq::x11::Window.
EQ_API bool eq::SystemWindow::processEvent | ( | EventType | type | ) |
Process a stateless event.
Referenced by glewGetContext(), eq::qt::WindowIF::processEvent(), eq::glx::WindowIF::processEvent(), and eq::wgl::WindowIF::processEvent().
EQ_API bool eq::SystemWindow::processEvent | ( | EventType | type, |
SizeEvent & | event | ||
) |
Process a (re)size event.
EQ_API bool eq::SystemWindow::processEvent | ( | EventType | type, |
PointerEvent & | event | ||
) |
Process a mouse event.
EQ_API bool eq::SystemWindow::processEvent | ( | EventType | type, |
KeyEvent & | event | ||
) |
Process a keyboard event.
EQ_API bool eq::SystemWindow::processEvent | ( | AxisEvent & | event | ) |
Process an axis event.
EQ_API bool eq::SystemWindow::processEvent | ( | ButtonEvent & | event | ) |
Process a button event.
|
pure virtual |
Set up the given drawable based on the current context.
Implemented in eq::GLWindow, eq::qt::ShareContextWindow, and eq::x11::Window.
Referenced by getFrameBufferObject().
|
pure virtual |
Resize the underlying frame buffer to the given size.
pvp | the viewport in pixels. |
Implemented in eq::qt::ShareContextWindow, and eq::GLWindow.
Referenced by glewGetContext().
EQ_API EventOCommand eq::SystemWindow::sendError | ( | const uint32_t | error | ) |
Send a window error event to the application node.
error | the error code. |
Referenced by glewGetContext().
EQ_API void eq::SystemWindow::setName | ( | const std::string & | name | ) |
Set the window's name.
Referenced by glewGetContext().
EQ_API void eq::SystemWindow::setPixelViewport | ( | const PixelViewport & | pvp | ) |
Set the window's pixel viewport wrt its parent pipe.
pvp | the viewport in pixels. |
Referenced by glewGetContext().
|
pure virtual |
Swap the front and back buffer.
Implemented in eq::wgl::Window, eq::glx::Window, eq::qt::Window, eq::qt::ShareContextWindow, and eq::x11::Window.
|
pure virtual |
Update the window's FBO from the multisampled FBO.
Implemented in eq::GLWindow, eq::qt::ShareContextWindow, and eq::x11::Window.