#include <window.h>


A Window is a child of a Pipe. The task methods for all windows of a pipe are executed sequentially in the same thread, in the order they are stored on the Pipe.
The default window initialization methods do initialize all windows of the same Pipe with a shared context, so that OpenGL objects can be reused between them for optimal GPU memory usage. Please not that each window might have it's own OpenGL command buffer, thus glFlush might be needed to synchronize the state of OpenGL objects between windows.
Definition at line 34 of file lib/client/window.h.
Attributes | |
| enum | IAttribute { IATTR_HINT_STEREO, IATTR_HINT_DOUBLEBUFFER, IATTR_HINT_FULLSCREEN, IATTR_HINT_DECORATION, IATTR_HINT_SWAPSYNC, IATTR_HINT_DRAWABLE, IATTR_HINT_STATISTICS, IATTR_HINT_SCREENSAVER, IATTR_PLANES_COLOR, IATTR_PLANES_ALPHA, IATTR_PLANES_DEPTH, IATTR_PLANES_STENCIL, IATTR_PLANES_ACCUM, IATTR_PLANES_ACCUM_ALPHA, IATTR_PLANES_SAMPLES, IATTR_ALL } |
| Window (visual) attributes, used during configInit(). More... | |
| void | setIAttribute (const IAttribute attr, const int32_t value) |
| int32_t | getIAttribute (const IAttribute attr) const |
| static const std::string & | getIAttributeString (const IAttribute attr) |
Callbacks | |
| The callbacks are called by Equalizer during rendering to execute various actions. | |
| class | GLXWindowIF |
| class | AGLWindowIF |
| class | WGLWindowIF |
| class | WindowStatistics |
| class | Channel |
| virtual bool | configInit (const uint32_t initID) |
| Initialize this window. | |
| virtual bool | configInitOSWindow (const uint32_t initID) |
| Initialize the OS-specific window. | |
| virtual bool | configInitGL (const uint32_t initID) |
| Initialize the OpenGL state for this window. | |
| virtual bool | configExit () |
| Exit this window. | |
| virtual bool | configExitOSWindow () |
| De-initialize the OS-specific window. | |
| virtual bool | configExitGL () |
| De-initializer the OpenGL state for this window. | |
| virtual void | frameStart (const uint32_t frameID, const uint32_t frameNumber) |
| Start rendering a frame. | |
| virtual void | frameFinish (const uint32_t frameID, const uint32_t frameNumber) |
| Finish rendering a frame. | |
| virtual void | frameDrawFinish (const uint32_t frameID, const uint32_t frameNumber) |
| Finish drawing. | |
| virtual void | makeCurrent () const |
| Make the window's drawable and context current. | |
| virtual void | swapBuffers () |
| Swap the front and back buffer of the window. | |
| virtual bool | processEvent (const Event &event) |
| Process a received event. | |
Error information. | |
| class | Pipe |
| void | setErrorMessage (const std::string &message) |
| Set a message why the last operation failed. | |
| virtual | ~Window () |
| Destructs the window. | |
Public Member Functions | |
| Window (Pipe *parent) | |
| Constructs a new window. | |
Data Access | |
| net::CommandQueue * | getPipeThreadQueue () |
| const Pipe * | getPipe () const |
| Pipe * | getPipe () |
| const Node * | getNode () const |
| Node * | getNode () |
| const Config * | getConfig () const |
| Config * | getConfig () |
| base::RefPtr< Client > | getClient () |
| base::RefPtr< Server > | getServer () |
| const ChannelVector & | getChannels () |
| const std::string & | getName () const |
| WindowVisitor::Result | accept (WindowVisitor *visitor) |
| Traverse this window and all children using a window visitor. | |
| void | setSharedContextWindow (Window *sharedContextWindow) |
| Set the window with which this window shares the OpenGL context, defaults to the first window of the pipe. | |
| const Window * | getSharedContextWindow () const |
| Window * | getSharedContextWindow () |
| GLEWContext * | glewGetContext () |
| Get the GLEW context for this window. | |
| WGLEWContext * | wglewGetContext () |
| const DrawableConfig & | getDrawableConfig () const |
| ObjectManager * | getObjectManager () |
| const ObjectManager * | getObjectManager () const |
| void | setPixelViewport (const PixelViewport &pvp) |
| Set the window's pixel viewport wrt its parent pipe. | |
| const PixelViewport & | getPixelViewport () const |
| const Viewport & | getViewport () const |
| void | addRenderContext (const RenderContext &context) |
| Add a channel's rendering context to the current frame's list. | |
| const RenderContext * | getRenderContext (const int32_t x, const int32_t y) const |
| Get the last rendering context at the x, y position, or 0. | |
Actions | |
| virtual void | finish () const |
| Finish outstanding rendering requests. | |
Interface to and from the OSWindow, the window-system specific | |
pieces for a Window. | |
| void | setOSWindow (OSWindow *window) |
| Set the OS-specific window. | |
| const OSWindow * | getOSWindow () const |
| OSWindow * | getOSWindow () |
Protected Member Functions | |
Actions | |
| void | startFrame (const uint32_t frameNumber) |
| Start a frame by unlocking all child resources. | |
| void | releaseFrame (const uint32_t frameNumber) |
| Signal the completion of a frame to the parent. | |
| void | releaseFrameLocal (const uint32_t frameNumber) |
| Release the local synchronization of the parent for a frame. | |
Classes | |
| struct | DrawableConfig |
| Stores current drawable characteristics. More... | |
| class | ObjectManager |
| The per-window object manager. More... | |
Window (visual) attributes, used during configInit().
| IATTR_HINT_STEREO | Active Stereo. |
| IATTR_HINT_DOUBLEBUFFER | Front and back buffer. |
| IATTR_HINT_FULLSCREEN | Fullscreen drawable. |
| IATTR_HINT_DECORATION | Window decorations. |
| IATTR_HINT_SWAPSYNC | Swap sync on vertical retrace. |
| IATTR_HINT_DRAWABLE | Drawable type. |
| IATTR_HINT_STATISTICS | Statistics gathering hint. |
| IATTR_HINT_SCREENSAVER | Screensaver (de)activation (WGL). |
| IATTR_PLANES_COLOR | No of per-component color planes. |
| IATTR_PLANES_ALPHA | No of alpha planes. |
| IATTR_PLANES_DEPTH | No of z-buffer planes. |
| IATTR_PLANES_STENCIL | No of stencil planes. |
| IATTR_PLANES_ACCUM | No of accumulation buffer planes. |
| IATTR_PLANES_ACCUM_ALPHA | No of alpha accum buffer planes. |
| IATTR_PLANES_SAMPLES | No of multisample (AA) planes. |
Definition at line 181 of file lib/client/window.h.
| const Pipe* eq::Window::getPipe | ( | ) | const [inline] |
Definition at line 77 of file lib/client/window.h.
Referenced by configInitOSWindow().

| WindowVisitor::Result eq::Window::accept | ( | WindowVisitor * | visitor | ) |
Traverse this window and all children using a window visitor.
| visitor | the visitor. |
Definition at line 136 of file lib/client/window.cpp.
References eq::Channel::accept(), eq::ChannelVisitor::TRAVERSE_CONTINUE, eq::ChannelVisitor::TRAVERSE_PRUNE, eq::ChannelVisitor::TRAVERSE_TERMINATE, eq::WindowVisitor::visitPost(), and eq::WindowVisitor::visitPre().
Referenced by eq::Pipe::accept().


| const Window* eq::Window::getSharedContextWindow | ( | ) | const [inline] |
Definition at line 113 of file lib/client/window.h.
Referenced by eq::AGLWindow::createAGLContext(), eq::GLXWindow::createGLXContext(), and eq::WGLWindow::createWGLContext().

| Window* eq::Window::getSharedContextWindow | ( | ) | [inline] |
Definition at line 117 of file lib/client/window.h.
| GLEWContext* eq::Window::glewGetContext | ( | ) | [inline] |
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 Window.
Definition at line 134 of file lib/client/window.h.
| WGLEWContext* eq::Window::wglewGetContext | ( | ) | [inline] |
Definition at line 137 of file lib/client/window.h.
| const DrawableConfig& eq::Window::getDrawableConfig | ( | ) | const [inline] |
Definition at line 140 of file lib/client/window.h.
Referenced by getRenderContext().

| ObjectManager* eq::Window::getObjectManager | ( | ) | [inline] |
Definition at line 144 of file lib/client/window.h.
Referenced by eq::Compositor::assembleImageDB_GLSL(), eq::Channel::drawStatistics(), and eq::Channel::frameReadback().

| void eq::Window::setPixelViewport | ( | const PixelViewport & | pvp | ) |
Set the window's pixel viewport wrt its parent pipe.
Updates the fractional viewport accordingly.
| pvp | the viewport in pixels. |
Definition at line 186 of file lib/client/window.cpp.
Referenced by eq::AGLWindow::configInitAGLFullscreen(), eq::GLXWindow::configInitGLXWindow(), processEvent(), eq::AGLWindow::setAGLPBuffer(), eq::AGLWindow::setCarbonWindow(), eq::WGLWindow::setWGLPBufferHandle(), eq::WGLWindow::setWGLWindowHandle(), and eq::GLXWindow::setXDrawable().

| const PixelViewport& eq::Window::getPixelViewport | ( | ) | const [inline] |
Definition at line 160 of file lib/client/window.h.
Referenced by eq::AGLWindow::configInitAGLFullscreen(), eq::AGLWindow::configInitAGLPBuffer(), eq::AGLWindow::configInitAGLWindow(), eq::GLXWindow::configInitGLXPBuffer(), eq::GLXWindow::configInitGLXWindow(), eq::WGLWindow::configInitWGLPBuffer(), eq::WGLWindow::configInitWGLWindow(), eq::Channel::drawStatistics(), and eq::Channel::setupAssemblyState().

| const Viewport& eq::Window::getViewport | ( | ) | const [inline] |
| const RenderContext * eq::Window::getRenderContext | ( | const int32_t | x, | |
| const int32_t | y | |||
| ) | const |
Get the last rendering context at the x, y position, or 0.
Definition at line 254 of file lib/client/window.cpp.
References eq::OSWindow::getContextLock(), getDrawableConfig(), eq::PixelViewport::isPointInside(), and eq::RenderContext::pvp.
Referenced by eq::EventHandler::_getRenderContext().


| virtual void eq::Window::finish | ( | ) | const [inline, virtual] |
| void eq::Window::setOSWindow | ( | OSWindow * | window | ) |
Set the OS-specific window.
The OS-specific window implements the window-system-dependent part, e.g., the drawable creation. This window forwards certain calls, e.g., swapBuffers() to the OS window. The os-specific window has to be initialized.
Definition at line 280 of file lib/client/window.cpp.
References makeCurrent().
Referenced by configInitOSWindow().


| void eq::Window::setErrorMessage | ( | const std::string & | message | ) | [inline] |
Set a message why the last operation failed.
The message will be transmitted to the originator of the request, for example to Config::init when set from within the configInit method.
| message | the error message. |
Definition at line 245 of file lib/client/window.h.
Referenced by eq::AGLWindow::chooseAGLPixelFormat(), eq::WGLWindow::chooseWGLPixelFormat(), eq::GLXWindow::chooseXVisualInfo(), configInit(), eq::WGLWindow::configInit(), eq::GLXWindow::configInit(), eq::AGLWindow::configInitAGLFullscreen(), eq::AGLWindow::configInitAGLPBuffer(), eq::AGLWindow::configInitAGLWindow(), eq::GLXWindow::configInitGLXPBuffer(), eq::GLXWindow::configInitGLXWindow(), eq::WGLWindow::configInitWGLPBuffer(), eq::WGLWindow::configInitWGLWindow(), eq::AGLWindow::createAGLContext(), eq::GLXWindow::createGLXContext(), eq::WGLWindow::createWGLContext(), and eq::WGLWindow::getWGLPipeDC().

| void eq::Window::startFrame | ( | const uint32_t | frameNumber | ) | [inline, protected] |
Start a frame by unlocking all child resources.
| frameNumber | the frame to start. |
Definition at line 262 of file lib/client/window.h.
| void eq::Window::releaseFrame | ( | const uint32_t | frameNumber | ) | [inline, protected] |
Signal the completion of a frame to the parent.
| frameNumber | the frame to end. |
Definition at line 269 of file lib/client/window.h.
| void eq::Window::releaseFrameLocal | ( | const uint32_t | frameNumber | ) | [inline, protected] |
Release the local synchronization of the parent for a frame.
| frameNumber | the frame to release. |
Definition at line 276 of file lib/client/window.h.
| bool eq::Window::configInit | ( | const uint32_t | initID | ) | [protected, virtual] |
Initialize this window.
| initID | the init identifier. |
Definition at line 301 of file lib/client/window.cpp.
References configInitGL(), configInitOSWindow(), eq::PixelViewport::isValid(), and setErrorMessage().

| bool eq::Window::configInitOSWindow | ( | const uint32_t | initID | ) | [protected, virtual] |
Initialize the OS-specific window.
Definition at line 318 of file lib/client/window.cpp.
References eq::OSWindow::configInit(), getPipe(), eq::Pipe::getWindowSystem(), and setOSWindow().
Referenced by configInit().


| bool eq::Window::configInitGL | ( | const uint32_t | initID | ) | [protected, virtual] |
Initialize the OpenGL state for this window.
| initID | the init identifier. |
true if the initialization was successful, false if not. Definition at line 419 of file lib/client/window.cpp.
References swapBuffers().
Referenced by configInit().


| bool eq::Window::configExit | ( | ) | [protected, virtual] |
Exit this window.
Definition at line 444 of file lib/client/window.cpp.
References configExitGL(), and configExitOSWindow().

| bool eq::Window::configExitOSWindow | ( | ) | [protected, virtual] |
De-initialize the OS-specific window.
Definition at line 450 of file lib/client/window.cpp.
References eq::OSWindow::configExit().
Referenced by configExit().


| virtual bool eq::Window::configExitGL | ( | ) | [inline, protected, virtual] |
De-initializer the OpenGL state for this window.
Definition at line 317 of file lib/client/window.h.
Referenced by configExit().

| virtual void eq::Window::frameStart | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [inline, protected, virtual] |
Start rendering a frame.
Called once at the beginning of each frame, to do per-frame updates of window-specific data. This method has to call startFrame().
| frameID | the per-frame identifier. | |
| frameNumber | the frame to start. |
Definition at line 329 of file lib/client/window.h.
| virtual void eq::Window::frameFinish | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [inline, protected, virtual] |
Finish rendering a frame.
Called once at the end of each frame, to do per-frame updates of window-specific data. This method has to call releaseFrame().
| frameID | the per-frame identifier. | |
| frameNumber | the frame to finish. |
Definition at line 342 of file lib/client/window.h.
| virtual void eq::Window::frameDrawFinish | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [inline, protected, virtual] |
Finish drawing.
Called once per frame after the last draw operation. Typically releases the local node thread synchronization for this frame.
| frameID | the per-frame identifier. | |
| frameNumber | the frame to finished with draw. |
Definition at line 355 of file lib/client/window.h.
| void eq::Window::makeCurrent | ( | ) | const [protected, virtual] |
Make the window's drawable and context current.
Definition at line 464 of file lib/client/window.cpp.
References eq::OSWindow::makeCurrent().
Referenced by setOSWindow().


| void eq::Window::swapBuffers | ( | ) | [protected, virtual] |
Swap the front and back buffer of the window.
Definition at line 470 of file lib/client/window.cpp.
References eq::OSWindow::swapBuffers().
Referenced by configInitGL().


| bool eq::Window::processEvent | ( | const Event & | event | ) | [protected, virtual] |
Process a received event.
The task of this method is to update the window as necessary, and transform the event into an config event to be send to the application using Config::sendEvent().
| event | the received window system event. |
Definition at line 479 of file lib/client/window.cpp.
References eq::ConfigEvent::data, eq::Window::DrawableConfig::doublebuffered, IATTR_HINT_DRAWABLE, IATTR_HINT_SCREENSAVER, eq::Config::sendEvent(), and setPixelViewport().

0.6 by
1.5.5