Equalizer 1.0

eq::Pipe Class Reference

A Pipe represents a graphics card (GPU) on a Node. More...

#include <pipe.h>

Inheritance diagram for eq::Pipe:
Collaboration diagram for eq::Pipe:

List of all members.

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::CommandQueuegetPipeThreadQueue ()
co::CommandQueuegetMainThreadQueue ()
co::CommandQueuegetCommandThreadQueue ()
ConfiggetConfig ()
const ConfiggetConfig () 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.
SystemPipegetSystemPipe ()
const SystemPipegetSystemPipe () const
Interface to and from the ComputeContext
Warning:
experimental - may not be supported in the future.
void setComputeContext (ComputeContext *ctx)
 Set the compute-specific context.
const ComputeContextgetComputeContext () const
ComputeContextgetComputeContext ()
Configuration.
virtual MessagePumpcreateMessagePump ()
 Create a new MessagePump for this pipe.
MessagePumpgetMessagePump ()

Operations

FramegetFrame (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 ViewgetView (const co::ObjectVersion &viewVersion) const
ViewgetView (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)

Detailed Description

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.

See also:
fabric::Pipe

Definition at line 48 of file include/eq/pipe.h.


Constructor & Destructor Documentation

eq::Pipe::Pipe ( Node parent)

Construct a new pipe.

Version:
1.0

Reimplemented in eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.

virtual eq::Pipe::~Pipe ( ) [virtual]

Destruct the pipe.

Version:
1.0

Reimplemented from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >.

Reimplemented in eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.


Member Function Documentation

virtual bool eq::Pipe::configExit ( ) [protected, virtual]

De-initialize this pipe.

Version:
1.0

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.

Parameters:
initIDthe init identifier.
Version:
1.0

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().

Here is the caller graph for this function:

virtual bool eq::Pipe::configInitSystemPipe ( const uint128_t initID) [protected, virtual]

Initialize the OS-specific pipe.

See also:
setSystemPipe()
Version:
1.0
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.

Returns:
the message pump, or 0.
Version:
1.0
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).

Parameters:
frameIDthe per-frame identifier.
frameNumberthe frame to finished with draw.
Version:
1.0
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().

Parameters:
frameIDthe per-frame identifier.
frameNumberthe frame to finish.
Version:
1.0
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().

Parameters:
frameIDthe per-frame identifier.
frameNumberthe frame to start.
See also:
Config::startFrame(), Node::startFrame(), Node::waitFrameStarted()
Version:
1.0

Reimplemented in eqNbody::Pipe, eqPly::Pipe, eVolve::Pipe, and osgScaleViewer::Pipe.

ClientPtr eq::Pipe::getClient ( )
Returns:
the parent client node.
Version:
1.0
const ComputeContext* eq::Pipe::getComputeContext ( ) const [inline]
Returns:
the compute context.

Definition at line 202 of file include/eq/pipe.h.

ComputeContext* eq::Pipe::getComputeContext ( ) [inline]
Returns:
the compute context.

Definition at line 206 of file include/eq/pipe.h.

const Config* eq::Pipe::getConfig ( ) const
Returns:
the parent configuration.
Version:
1.0
uint32_t eq::Pipe::getCurrentFrame ( ) const [inline]

Return the current frame number.

To be called only from the pipe thread. Updated by startFrame().

Returns:
the current frame number.
Version:
1.0

Definition at line 93 of file include/eq/pipe.h.

MessagePump* eq::Pipe::getMessagePump ( )
Returns:
the pipe's message pump, or 0.
Version:
1.0
ServerPtr eq::Pipe::getServer ( )
Returns:
the parent server node.
Version:
1.0
SystemPipe* eq::Pipe::getSystemPipe ( ) [inline]
Returns:
the OS-specific pipe implementation.
Version:
1.0

Definition at line 187 of file include/eq/pipe.h.

const SystemPipe* eq::Pipe::getSystemPipe ( ) const [inline]
Returns:
the OS-specific pipe implementation.
Version:
1.0

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.

Returns:
the window system used by this pipe.
Version:
1.0

Definition at line 106 of file include/eq/pipe.h.

bool eq::Pipe::isRunning ( ) const
Returns:
true if this pipe is running, false otherwise.
Version:
1.0
bool eq::Pipe::isStopped ( ) const
Returns:
true if this pipe is stopped, false otherwise.
Version:
1.0
void eq::Pipe::releaseFrame ( const uint32_t  frameNumber) [protected]

Signal the completion of a frame to the parent.

Parameters:
frameNumberthe frame to end.
Version:
1.0
void eq::Pipe::releaseFrameLocal ( const uint32_t  frameNumber) [protected]

Release the local synchronization of the parent for a frame.

Parameters:
frameNumberthe frame to release.
Version:
1.0
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.

Returns:
the window system currently used by this pipe.
Version:
1.0

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.

Version:
1.0

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.

Version:
1.0

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.

Parameters:
frameNumberthe frame to start.
Version:
1.0
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.

Parameters:
systemthe window system to test.
Returns:
true if the window system is supported, false if not.
Version:
1.0

Referenced by eVolve::Pipe::selectWindowSystem(), and eqPly::Pipe::selectWindowSystem().

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3