Equalizer
1.2.1
|
A Pipe represents a graphics card (GPU) on a Node. More...
#include <pipe.h>
Public Member Functions | |
Pipe (Node *parent) | |
Construct a new pipe. | |
virtual | ~Pipe () |
Destruct the pipe. | |
void | waitExited () const |
void | notifyMapped () |
void | waitFrameFinished (const uint32_t frameNumber) const |
void | waitFrameLocal (const uint32_t frameNumber) const |
void | startThread () |
void | exitThread () |
void | cancelThread () |
virtual void | setDirty (const uint64_t bits) |
Add dirty flags to mark data for distribution. | |
Data Access. | |
co::CommandQueue * | getPipeThreadQueue () |
co::CommandQueue * | getMainThreadQueue () |
co::CommandQueue * | getCommandThreadQueue () |
Config * | getConfig () |
const Config * | getConfig () const |
ClientPtr | getClient () |
ServerPtr | getServer () |
bool | isRunning () const |
bool | isStopped () const |
uint32_t | getCurrentFrame () const |
Return the current frame number. | |
uint32_t | getFinishedFrame () const |
WindowSystem | getWindowSystem () const |
Return the window system used by this pipe. | |
Interface to and from the SystemPipe, the window-system | |
specific pieces for a pipe. | |
void | setSystemPipe (SystemPipe *pipe) |
Set the system-specific pipe implementation. | |
SystemPipe * | getSystemPipe () |
const SystemPipe * | getSystemPipe () const |
Interface to and from the ComputeContext | |
| |
void | setComputeContext (ComputeContext *ctx) |
Set the compute-specific context. | |
const ComputeContext * | getComputeContext () const |
ComputeContext * | getComputeContext () |
Configuration. | |
virtual MessagePump * | createMessagePump () |
Create a new MessagePump for this pipe. | |
MessagePump * | getMessagePump () |
Operations | |
Frame * | getFrame (const co::ObjectVersion &frameVersion, const Eye eye, const bool output) |
co::QueueSlave * | getQueue (const co::ObjectVersion &queueVersion) |
void | flushFrames () |
bool | isCurrent (const Window *window) const |
void | setCurrent (const Window *window) const |
const View * | getView (const co::ObjectVersion &viewVersion) const |
View * | getView (const co::ObjectVersion &viewVersion) |
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. | |
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 |
Choose the window system to be used by this pipe. | |
virtual bool | configInit (const uint128_t &initID) |
Initialize this pipe. | |
virtual bool | configInitSystemPipe (const uint128_t &initID) |
Initialize the OS-specific pipe. | |
virtual bool | configExit () |
De-initialize this pipe. | |
virtual void | frameStart (const uint128_t &frameID, const uint32_t frameNumber) |
Start rendering a frame. | |
virtual void | frameFinish (const uint128_t &frameID, const uint32_t frameNumber) |
Finish rendering a frame. | |
virtual void | frameDrawFinish (const uint128_t &frameID, const uint32_t frameNumber) |
Finish drawing. | |
virtual void | attach (const UUID &id, const uint32_t instanceID) |
A Pipe represents a graphics card (GPU) on a Node.
All Pipe, Window and Channel task methods are executed in a separate eq::Worker thread, in parallel with all other pipes in the system. An exception are non-threaded pipes, which execute their tasks on the Node's main thread.
Definition at line 47 of file include/eq/client/pipe.h.
eq::Pipe::Pipe | ( | Node * | parent | ) |
Construct a new pipe.
Reimplemented in eqAsync::Pipe, osgScaleViewer::Pipe, eqPly::Pipe, eqNbody::Pipe, and eVolve::Pipe.
virtual eq::Pipe::~Pipe | ( | ) | [virtual] |
Destruct the pipe.
Reimplemented from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >.
Reimplemented in osgScaleViewer::Pipe, eqPly::Pipe, eVolve::Pipe, and eqNbody::Pipe.
virtual bool eq::Pipe::configExit | ( | ) | [protected, virtual] |
De-initialize this pipe.
Reimplemented in osgScaleViewer::Pipe, eqAsync::Pipe, eqPly::Pipe, eVolve::Pipe, and eqNbody::Pipe.
virtual bool eq::Pipe::configInit | ( | const uint128_t & | initID | ) | [protected, virtual] |
Initialize this pipe.
initID | the init identifier. |
Reimplemented in osgScaleViewer::Pipe, eqPly::Pipe, eVolve::Pipe, and eqNbody::Pipe.
Referenced by eqNbody::Pipe::configInit(), eVolve::Pipe::configInit(), eqPly::Pipe::configInit(), and osgScaleViewer::Pipe::configInit().
virtual bool eq::Pipe::configInitSystemPipe | ( | const uint128_t & | initID | ) | [protected, virtual] |
virtual 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. The process main thread creates a message pump for AGL pipes and non-threaded pipes. Applications which do their own message pumping outside of Equalizer should return 0 here.
virtual void eq::Pipe::frameDrawFinish | ( | const uint128_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. |
virtual void eq::Pipe::frameFinish | ( | const uint128_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. |
virtual void eq::Pipe::frameStart | ( | const uint128_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 osgScaleViewer::Pipe, eqAsync::Pipe, eqPly::Pipe, eVolve::Pipe, and eqNbody::Pipe.
const ComputeContext* eq::Pipe::getComputeContext | ( | ) | const [inline] |
Definition at line 206 of file include/eq/client/pipe.h.
ComputeContext* eq::Pipe::getComputeContext | ( | ) | [inline] |
Definition at line 210 of file include/eq/client/pipe.h.
Referenced by eqNbody::Pipe::configExit(), eVolve::Pipe::configExit(), eqPly::Pipe::configExit(), osgScaleViewer::Pipe::configExit(), eqNbody::Pipe::configInit(), eVolve::Pipe::configInit(), eqPly::Pipe::configInit(), osgScaleViewer::Pipe::configInit(), eVolve::Pipe::selectWindowSystem(), and eqPly::Pipe::selectWindowSystem().
const Config* eq::Pipe::getConfig | ( | ) | const |
uint32_t eq::Pipe::getCurrentFrame | ( | ) | const |
Return the current frame number.
To be called only from the pipe thread. Updated by startFrame().
SystemPipe* eq::Pipe::getSystemPipe | ( | ) | [inline] |
Definition at line 191 of file include/eq/client/pipe.h.
const SystemPipe* eq::Pipe::getSystemPipe | ( | ) | const [inline] |
Definition at line 194 of file include/eq/client/pipe.h.
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 configInit() is executed.
Definition at line 105 of file include/eq/client/pipe.h.
bool eq::Pipe::isRunning | ( | ) | const |
bool eq::Pipe::isStopped | ( | ) | const |
void eq::Pipe::releaseFrame | ( | const uint32_t | frameNumber | ) | [protected] |
Signal the completion of a frame to the parent.
frameNumber | the frame to end. |
void eq::Pipe::releaseFrameLocal | ( | const uint32_t | frameNumber | ) | [protected] |
Release the local synchronization of the parent for a frame.
frameNumber | the frame to release. |
virtual WindowSystem eq::Pipe::selectWindowSystem | ( | ) | const [protected, virtual] |
Choose 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.
void eq::Pipe::setComputeContext | ( | ComputeContext * | ctx | ) | [inline] |
Set the compute-specific context.
Definition at line 203 of file include/eq/client/pipe.h.
virtual void eq::Pipe::setDirty | ( | const uint64_t | bits | ) | [virtual] |
Add dirty flags to mark data for distribution.
Reimplemented from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >.
void eq::Pipe::setSystemPipe | ( | SystemPipe * | pipe | ) | [inline] |
Set the system-specific pipe implementation.
The system-specific pipe implements the window-system-dependent part. The os-specific pipe has to be initialized.
Definition at line 188 of file include/eq/client/pipe.h.
void eq::Pipe::startFrame | ( | const uint32_t | frameNumber | ) | [protected] |
Start a frame by unlocking all child resources.
frameNumber | the frame to start. |
virtual bool eq::Pipe::supportsWindowSystem | ( | const WindowSystem | system | ) | const [inline, protected, virtual] |
Tests wether a particular windowing system is supported by this pipe and all its windows.
Returns always true since version 1.1.3 since the WindowSystem is an object.
system | the window system to test. |
Definition at line 283 of file include/eq/client/pipe.h.