Equalizer 1.0
|
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) | |
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 | joinThread () |
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) |
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 co::base::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 48 of file include/eq/pipe.h.
eq::Pipe::Pipe | ( | Node * | parent | ) |
Construct a new pipe.
Reimplemented in eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.
virtual eq::Pipe::~Pipe | ( | ) | [virtual] |
Destruct the pipe.
Reimplemented from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >.
Reimplemented in eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.
virtual bool eq::Pipe::configExit | ( | ) | [protected, virtual] |
De-initialize this pipe.
Reimplemented in eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.
virtual bool eq::Pipe::configInit | ( | const uint128_t & | initID | ) | [protected, virtual] |
Initialize this pipe.
initID | the init identifier. |
Reimplemented in eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.
Referenced by osgScaleViewer::Pipe::configInit(), eVolve::Pipe::configInit(), eqPly::Pipe::configInit(), and eqNbody::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 eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.
ClientPtr eq::Pipe::getClient | ( | ) |
const ComputeContext* eq::Pipe::getComputeContext | ( | ) | const [inline] |
Definition at line 202 of file include/eq/pipe.h.
ComputeContext* eq::Pipe::getComputeContext | ( | ) | [inline] |
Definition at line 206 of file include/eq/pipe.h.
Config* eq::Pipe::getConfig | ( | ) |
Referenced by osgScaleViewer::Pipe::configExit(), eVolve::Pipe::configExit(), eqPly::Pipe::configExit(), eqNbody::Pipe::configExit(), osgScaleViewer::Pipe::configInit(), eVolve::Pipe::configInit(), eqPly::Pipe::configInit(), eqNbody::Pipe::configInit(), eVolve::Pipe::selectWindowSystem(), and eqPly::Pipe::selectWindowSystem().
const Config* eq::Pipe::getConfig | ( | ) | const |
uint32_t eq::Pipe::getCurrentFrame | ( | ) | const [inline] |
Return the current frame number.
To be called only from the pipe thread. Updated by startFrame().
Definition at line 93 of file include/eq/pipe.h.
MessagePump* eq::Pipe::getMessagePump | ( | ) |
ServerPtr eq::Pipe::getServer | ( | ) |
SystemPipe* eq::Pipe::getSystemPipe | ( | ) | [inline] |
Definition at line 187 of file include/eq/pipe.h.
const SystemPipe* eq::Pipe::getSystemPipe | ( | ) | const [inline] |
Definition at line 190 of file include/eq/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 106 of file include/eq/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 199 of file include/eq/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 184 of file include/eq/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 [protected, virtual] |
Tests wether a particular windowing system is supported by this pipe and all its windows.
system | the window system to test. |
Referenced by eVolve::Pipe::selectWindowSystem(), and eqPly::Pipe::selectWindowSystem().