A Pipe represents a graphics card (GPU) on a Node. More...
#include <pipe.h>


Classes | |
| class | PipeThread |
| The pipe thread. | |
Public Member Functions | |
| Pipe (Node *parent) | |
| Constructs a new pipe. | |
| virtual | ~Pipe () |
| Destructs the pipe. | |
| void | waitExited () const |
| Wait for the pipe to be exited. | |
| bool | isRunning () const |
| void | waitFrameFinished (const uint32_t frameNumber) const |
| Wait for a frame to be finished. | |
| void | waitFrameLocal (const uint32_t frameNumber) const |
| Wait for a frame to be released locally. | |
| void | startThread () |
| Start the pipe thread. | |
| void | joinThread () |
| Wait for the pipe thread to exit. | |
Data Access. | |
| net::CommandQueue * | getPipeThreadQueue () |
| Node * | getNode () |
| const Node * | getNode () const |
| Config * | getConfig () |
| const Config * | getConfig () const |
| ClientPtr | getClient () |
| ServerPtr | getServer () |
| const WindowVector & | getWindows () const |
| const std::string & | getName () const |
| uint32_t | getTasks () const |
| Return the set of tasks this pipe's channels might execute in the worst case. | |
| bool | isThreaded () const |
| uint32_t | getCurrentFrame () const |
| uint32_t | getFinishedFrame () const |
| VisitorResult | accept (PipeVisitor &visitor) |
| Traverse this pipe and all children using a pipe visitor. | |
| VisitorResult | accept (PipeVisitor &visitor) const |
| Const-version of accept(). | |
| void | setPixelViewport (const eq::PixelViewport &pvp) |
| Set the pipes's pixel viewport. | |
| const PixelViewport & | getPixelViewport () const |
| uint32_t | getPort () const |
| Returns the port number of this pipe. | |
| uint32_t | getDevice () const |
| Returns the device number of this pipe. | |
| WindowSystem | getWindowSystem () const |
| Return the window system used by this pipe. | |
| int64_t | getFrameTime () const |
Operations | |
| Frame * | getFrame (const net::ObjectVersion &frameVersion, const Eye eye) |
| Get an assembly frame. | |
| void | flushFrames () |
| bool | isCurrent (const Window *window) const |
| void | setCurrent (const Window *window) const |
| Set the window as current window. | |
| const View * | getView (const net::ObjectVersion &viewVersion) const |
Interface to and from the OSPipe, the window-system specific | |
| void | setOSPipe (OSPipe *pipe) |
| Set the OS-specific pipe. | |
| const OSPipe * | getOSPipe () const |
| OSPipe * | getOSPipe () |
Error information. | |
| void | setErrorMessage (const std::string &message) |
| Set a message why the last operation failed. | |
Configuration. | |
| virtual MessagePump * | createMessagePump () |
| Create a new MessagePump for this pipe. | |
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. | |
Friends | |
| class | Node |
Callbacks | |
The callbacks are called by Equalizer during rendering to execute various actions. | |
| class | Window |
| virtual bool | supportsWindowSystem (const WindowSystem system) const |
| Tests wether a particular windowing system is supported by this pipe and all its windows. | |
| virtual WindowSystem | selectWindowSystem () const |
| Return the window system to be used by this pipe. | |
| virtual bool | configInit (const uint32_t initID) |
| Initialize this pipe. | |
| virtual bool | configExit () |
| Exit this pipe. | |
| 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 | attachToSession (const uint32_t id, const uint32_t instanceID, net::Session *session) |
A Pipe represents a graphics card (GPU) on a Node.
All Pipe, Window and Channel task methods are executed in a separate eq::base::Thread, in parallel with all other pipes in the system, unless the pipe is non-threaded, in which case the tasks are executed on the Node's main thread.
Definition at line 57 of file lib/client/pipe.h.
| eq::Pipe::Pipe | ( | Node * | parent | ) |
Constructs a new pipe.
Reimplemented in eqNbody::Pipe, eqPly::Pipe, and eVolve::Pipe.
Definition at line 63 of file lib/client/pipe.cpp.
References EQINFO.
| eq::Pipe::~Pipe | ( | ) | [virtual] |
Destructs the pipe.
Reimplemented in eqNbody::Pipe, eqPly::Pipe, and eVolve::Pipe.
Definition at line 82 of file lib/client/pipe.cpp.
| uint32_t eq::Pipe::getTasks | ( | ) | const [inline] |
Return the set of tasks this pipe's channels might execute in the worst case.
It is not guaranteed that all the tasks will be actually executed during rendering.
Definition at line 92 of file lib/client/pipe.h.
Referenced by eq::Node::frameDrawFinish(), and eq::Node::frameTasksFinish().

| VisitorResult eq::Pipe::accept | ( | PipeVisitor & | visitor | ) |
Traverse this pipe and all children using a pipe visitor.
| visitor | the visitor. |
Definition at line 162 of file lib/client/pipe.cpp.
| VisitorResult eq::Pipe::accept | ( | PipeVisitor & | visitor | ) | const |
Const-version of accept().
Definition at line 167 of file lib/client/pipe.cpp.
| void eq::Pipe::setPixelViewport | ( | const eq::PixelViewport & | pvp | ) | [inline] |
Set the pipes's pixel viewport.
Used from _osPipe calls
| pvp | the viewport in pixels. |
Definition at line 116 of file lib/client/pipe.h.
Referenced by eq::WGLPipe::configExit(), and eq::WGLPipe::configInit().

| const PixelViewport& eq::Pipe::getPixelViewport | ( | ) | const [inline] |
Definition at line 121 of file lib/client/pipe.h.
Referenced by eq::WGLPipe::configInit(), and eq::AGLWindow::configInitAGLFullscreen().

| uint32_t eq::Pipe::getPort | ( | ) | const [inline] |
Returns the port number of this pipe.
The port number identifies the X server for systems using the X11/GLX window system. It currently has no meaning on other systems.
EQ_UNDEFINED_UINT32. Definition at line 132 of file lib/client/pipe.h.
| uint32_t eq::Pipe::getDevice | ( | ) | const [inline] |
Returns the device number of this pipe.
The device number identifies the X screen for systems using the X11/GLX window system, or the number of the virtual screen for the AGL window system. On Windows systems it identifies the graphics adapter. Normally the device identifies a GPU.
EQ_UNDEFINED_UINT32. Definition at line 145 of file lib/client/pipe.h.
Referenced by eqNbody::Window::configInit(), eq::GLXPipe::configInit(), eq::AGLPipe::configInit(), and eq::WGLPipe::createWGLDisplayDC().

| WindowSystem eq::Pipe::getWindowSystem | ( | ) | const [inline] |
Return the window system used by this pipe.
The return value is quaranteed to be constant for an initialized pipe, that is, the window system is determined using selectWindowSystem() before the pipe init method is executed.
Definition at line 156 of file lib/client/pipe.h.
Referenced by eq::Window::configInitOSWindow(), eq::Window::getMediumFont(), eq::Window::getSmallFont(), and eq::Config::setupMessagePump().

| int64_t eq::Pipe::getFrameTime | ( | ) | const |
Definition at line 112 of file lib/client/pipe.cpp.
References eq::Config::getTime().

| Frame * eq::Pipe::getFrame | ( | const net::ObjectVersion & | frameVersion, | |
| const Eye | eye | |||
| ) |
Get an assembly frame.
| frameVersion | the frame's identifier and version. | |
| eye | the current eye pass. |
For internal use only.
Definition at line 357 of file lib/client/pipe.cpp.
References eq::Node::getFrameData(), eq::net::Object::getSession(), eq::net::Session::mapObject(), eq::Frame::setData(), and eq::net::Object::sync().

| void eq::Pipe::flushFrames | ( | ) |
For internal use only.
Clear the frame cache and delete all frames.
Definition at line 381 of file lib/client/pipe.cpp.
References eq::Frame::flush(), eq::net::Object::getSession(), and eq::net::Session::unmapObject().

| bool eq::Pipe::isCurrent | ( | const Window * | window | ) | const |
Definition at line 464 of file lib/client/pipe.cpp.
Referenced by eq::Window::configExitOSWindow(), eq::Window::makeCurrent(), and eq::Window::~Window().

| void eq::Pipe::setCurrent | ( | const Window * | window | ) | const |
Set the window as current window.
Definition at line 471 of file lib/client/pipe.cpp.
Referenced by eq::Window::configExitOSWindow(), eq::GLWindow::makeCurrent(), and eq::Window::~Window().

| const View * eq::Pipe::getView | ( | const net::ObjectVersion & | viewVersion | ) | const |
For internal use only.
Definition at line 396 of file lib/client/pipe.cpp.
References eq::NodeFactory::createView(), eq::Global::getNodeFactory(), eq::net::Object::getSession(), eq::net::Session::mapObject(), and eq::net::Object::sync().
Referenced by eq::Channel::getNativeView(), and eq::Channel::getView().


| void eq::Pipe::waitExited | ( | ) | const |
Wait for the pipe to be exited.
Definition at line 500 of file lib/client/pipe.cpp.
References eq::base::Monitor< T >::waitEQ().

| void eq::Pipe::waitFrameFinished | ( | const uint32_t | frameNumber | ) | const |
Wait for a frame to be finished.
| frameNumber | the frame number. |
Definition at line 510 of file lib/client/pipe.cpp.
References eq::base::Monitor< T >::waitGE().

| void eq::Pipe::waitFrameLocal | ( | const uint32_t | frameNumber | ) | const |
Wait for a frame to be released locally.
| frameNumber | the frame number. |
Definition at line 515 of file lib/client/pipe.cpp.
References eq::base::Monitor< T >::waitGE().
Referenced by eq::Node::frameDrawFinish(), and eq::Node::frameTasksFinish().


| void eq::Pipe::startThread | ( | ) |
Start the pipe thread.
Definition at line 479 of file lib/client/pipe.cpp.
| void eq::Pipe::joinThread | ( | ) |
Wait for the pipe thread to exit.
Definition at line 487 of file lib/client/pipe.cpp.
| void eq::Pipe::setOSPipe | ( | OSPipe * | pipe | ) | [inline] |
Set the OS-specific pipe.
The OS-specific pipe implements the window-system-dependent part. The os-specific pipe has to be initialized.
Definition at line 227 of file lib/client/pipe.h.
Referenced by configInit().

| void eq::Pipe::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 244 of file lib/client/pipe.h.
Referenced by eVolve::Pipe::configInit(), configInit(), and eq::WGLPipe::createWGLDisplayDC().

| MessagePump * eq::Pipe::createMessagePump | ( | ) | [virtual] |
Create a new MessagePump for this pipe.
At most one message pump per execution thread is created. Each pipe render thread creates one message pump for its window system, and the process main thread creates a message pump for AGL pipes or if non-threaded pipes are used. Applications which do their own message pumping outside of Equalizer should return 0 here.
Definition at line 290 of file lib/client/pipe.cpp.
References eq::WINDOW_SYSTEM_AGL, eq::WINDOW_SYSTEM_GLX, and eq::WINDOW_SYSTEM_WGL.
Referenced by eq::Config::setupMessagePump().

| void eq::Pipe::startFrame | ( | const uint32_t | frameNumber | ) | [protected] |
Start a frame by unlocking all child resources.
| frameNumber | the frame to start. |
Definition at line 666 of file lib/client/pipe.cpp.
References EQLOG, and eq::LOG_TASKS.
Referenced by frameStart().

| void eq::Pipe::releaseFrame | ( | const uint32_t | frameNumber | ) | [protected] |
Signal the completion of a frame to the parent.
| frameNumber | the frame to end. |
Definition at line 673 of file lib/client/pipe.cpp.
References EQLOG, and eq::LOG_TASKS.
Referenced by frameFinish().

| void eq::Pipe::releaseFrameLocal | ( | const uint32_t | frameNumber | ) | [protected] |
Release the local synchronization of the parent for a frame.
The synchronization is released only for this frame, not for previous, possible yet unreleased frames.
The synchronization is released only for this frame, not for previous, possible yet unreleased frames.
| frameNumber | the frame to release. |
Definition at line 680 of file lib/client/pipe.cpp.
References EQLOG, eq::base::Monitor< T >::get(), and eq::LOG_TASKS.
Referenced by frameDrawFinish(), frameFinish(), and frameStart().


| bool eq::Pipe::supportsWindowSystem | ( | const WindowSystem | system | ) | const [protected, virtual] |
Tests wether a particular windowing system is supported by this pipe and all its windows.
| system | the window system to test. |
true if the window system is supported, false if not. Definition at line 224 of file lib/client/pipe.cpp.
References eq::WINDOW_SYSTEM_AGL, eq::WINDOW_SYSTEM_GLX, and eq::WINDOW_SYSTEM_WGL.
Referenced by eVolve::Pipe::selectWindowSystem(), eqPly::Pipe::selectWindowSystem(), and selectWindowSystem().

| WindowSystem eq::Pipe::selectWindowSystem | ( | ) | const [protected, virtual] |
Return the window system to be used by this pipe.
This function determines which of the supported windowing systems is used by this pipe instance.
Reimplemented in eqPly::Pipe, and eVolve::Pipe.
Definition at line 241 of file lib/client/pipe.cpp.
References supportsWindowSystem().

| bool eq::Pipe::configInit | ( | const uint32_t | initID | ) | [protected, virtual] |
Initialize this pipe.
| initID | the init identifier. |
Reimplemented in eqNbody::Pipe, eqPly::Pipe, and eVolve::Pipe.
Definition at line 529 of file lib/client/pipe.cpp.
References eq::OSPipe::configInit(), EQERROR, EQINFO, eq::OSPipe::getErrorMessage(), setErrorMessage(), setOSPipe(), eq::WINDOW_SYSTEM_AGL, eq::WINDOW_SYSTEM_GLX, and eq::WINDOW_SYSTEM_WGL.
Referenced by eVolve::Pipe::configInit(), eqPly::Pipe::configInit(), and eqNbody::Pipe::configInit().


| void eq::Pipe::frameStart | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [protected, virtual] |
Start rendering a frame.
Called once at the beginning of each frame, to do per-frame updates of pipe-specific data, for example updating the rendering engine. Waits for the node to start the frame, unless the thread model is async. If the thread model is async, the local synchronization is released immediately.
This method has to call startFrame().
| frameID | the per-frame identifier. | |
| frameNumber | the frame to start. |
Reimplemented in eqNbody::Pipe, eqPly::Pipe, and eVolve::Pipe.
Definition at line 600 of file lib/client/pipe.cpp.
References eq::ASYNC, eq::DRAW_SYNC, eq::Node::IATTR_THREAD_MODEL, eq::LOCAL_SYNC, releaseFrameLocal(), startFrame(), and eq::Node::waitFrameStarted().

| void eq::Pipe::frameFinish | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [protected, virtual] |
Finish rendering a frame.
Called once at the end of each frame, to do per-frame updates of pipe-specific data, for example updating the rendering engine. Releases the local synchronization if the thread model is local_sync. Always releases the global synchronization for this pipe.
This method has to call releaseFrame().
| frameID | the per-frame identifier. | |
| frameNumber | the frame to finish. |
Definition at line 643 of file lib/client/pipe.cpp.
References eq::ASYNC, eq::DRAW_SYNC, eq::Node::IATTR_THREAD_MODEL, eq::LOCAL_SYNC, releaseFrame(), and releaseFrameLocal().

| void eq::Pipe::frameDrawFinish | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [protected, virtual] |
Finish drawing.
Called once per frame after the last draw operation. Releases the local synchronization if the thread model is draw_sync (the default).
| frameID | the per-frame identifier. | |
| frameNumber | the frame to finished with draw. |
Definition at line 623 of file lib/client/pipe.cpp.
References eq::ASYNC, eq::DRAW_SYNC, eq::Node::IATTR_THREAD_MODEL, eq::LOCAL_SYNC, and releaseFrameLocal().

| void eq::Pipe::attachToSession | ( | const uint32_t | id, | |
| const uint32_t | instanceID, | |||
| net::Session * | session | |||
| ) | [protected, virtual] |
Reimplemented from eq::net::Object.
Definition at line 172 of file lib/client/pipe.cpp.
References eq::net::Dispatcher::registerCommand().

0.9.1 by
1.6.1