Equalizer  2.1.0
Parallel Rendering Framework
eq::fabric::Channel< W, C > Class Template Reference

Base data transport class for channels. More...

#include <channel.h>

+ Inheritance diagram for eq::fabric::Channel< W, C >:
+ Collaboration diagram for eq::fabric::Channel< W, C >:

Public Types

typedef LeafVisitor< C > Visitor
 The channel visitor type.
 
typedef W Parent
 The parent window type.
 
- Public Types inherited from eq::fabric::Object
enum  DirtyBits {
  DIRTY_NAME = Serializable::DIRTY_CUSTOM << 0, DIRTY_USERDATA = Serializable::DIRTY_CUSTOM << 1, DIRTY_TASKS = Serializable::DIRTY_CUSTOM << 2, DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 3,
  DIRTY_SERIAL = Serializable::DIRTY_CUSTOM << 4, DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 6, DIRTY_OBJECT_BITS = DIRTY_NAME | DIRTY_USERDATA
}
 The changed parts of the object since the last pack(). More...
 

Public Member Functions

virtual bool omitOutput () const
 
virtual void output (std::ostream &) const
 
Data Access
void init ()
 
W * getWindow ()
 
const W * getWindow () const
 
bool isDestination () const
 
void setViewVersion (const co::ObjectVersion &view)
 
const co::ObjectVersion & getViewVersion () const
 
void setPixelViewport (const PixelViewport &pvp)
 
EQFABRIC_INL void setViewport (const Viewport &vp)
 
virtual void notifyViewportChanged ()
 
const PixelViewportgetNativePixelViewport () const
 
bool hasFixedViewport () const
 
EQFABRIC_INL void setNearFar (const float nearPlane, const float farPlane)
 Set the near and far planes for this channel. More...
 
EQFABRIC_INL VisitorResult accept (Visitor &visitor)
 Perform a depth-first traversal of this channel. More...
 
EQFABRIC_INL VisitorResult accept (Visitor &visitor) const
 Const-version of accept(). More...
 
EQFABRIC_INL void setCapabilities (const uint64_t bitmask)
 Set the capabilities supported by the channel. More...
 
EQFABRIC_INL uint64_t getCapabilities () const
 
void setOverdraw (const Vector4i &overdraw)
 
EQFABRIC_INL ChannelPath getPath () const
 
virtual EQFABRIC_INL void backup ()
 
virtual EQFABRIC_INL void restore ()
 
Context-specific data access.

The data returned by these methods depends on the context (callback) they are called from, typically the data for the current rendering task.

If they are called outside of a frame task method, they return the channel's native parameter, e.g., a placeholder value for the task decomposition parameters.

uint32_t getDrawBuffer () const
 
uint32_t getReadBuffer () const
 
const ColorMaskgetDrawBufferMask () const
 
const PixelViewportgetPixelViewport () const
 
virtual bool useOrtho () const
 Select perspective or orthographic rendering. More...
 
const Frustumf & getFrustum () const
 
const Frustumf & getPerspective () const
 
const Frustumf & getOrtho () const
 
const Matrix4f & getHeadTransform () const
 Return the view matrix. More...
 
const Matrix4f & getPerspectiveTransform () const
 Return the perspective view matrix. More...
 
const Matrix4f & getOrthoTransform () const
 Return the orthographic view matrix. More...
 
const ViewportgetViewport () const
 
const RangegetRange () const
 
const PixelgetPixel () const
 
const SubPixelgetSubPixel () const
 
const ZoomgetZoom () const
 
uint32_t getPeriod () const
 
uint32_t getPhase () const
 
const Vector2i & getPixelOffset () const
 Get the channel's current position wrt the destination channel. More...
 
Eye getEye () const
 
const Vector4i & getOverdraw () const
 
uint32_t getTaskID () const
 
const RenderContextgetContext () const
 
- Public Member Functions inherited from eq::fabric::Object
EQFABRIC_API bool isDirty () const override
 
EQFABRIC_API uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT) override
 
virtual EQFABRIC_API void setName (const std::string &name)
 Set the name of the object. More...
 
EQFABRIC_API const std::string & getName () const
 
EQFABRIC_API void setUserData (co::Object *userData)
 Set user-specific data. More...
 
EQFABRIC_API co::Object * getUserData ()
 
EQFABRIC_API const co::Object * getUserData () const
 
EQFABRIC_API uint32_t getTasks () const
 Return the set of tasks this channel might execute in the worst case. More...
 
EQFABRIC_API uint32_t getSerial () const
 

Protected Types

enum  DirtyBits {
  DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0, DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 1, DIRTY_PIXELVIEWPORT = Object::DIRTY_CUSTOM << 2, DIRTY_MEMBER = Object::DIRTY_CUSTOM << 3,
  DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 4, DIRTY_CAPABILITIES = Object::DIRTY_CUSTOM << 5, DIRTY_CHANNEL_BITS
}
 

Protected Member Functions

EQFABRIC_INL Channel (W *parent)
 Construct a new channel.
 
 Channel (const Channel &from)
 Construct a copy of a channel (view/segment dest).
 
virtual EQFABRIC_INL ~Channel ()
 Destruct the channel.
 
virtual EQFABRIC_INL void serialize (co::DataOStream &os, const uint64_t dirtyBits)
 
virtual EQFABRIC_INL void deserialize (co::DataIStream &is, const uint64_t dirtyBits)
 
virtual EQFABRIC_INL void setDirty (const uint64_t bits)
 
void setIAttribute (const IAttribute attr, const int32_t value)
 
void setSAttribute (const SAttribute attr, const std::string &value)
 
virtual ChangeType getChangeType () const
 
virtual uint64_t getRedistributableBits () const
 
virtual void updateCapabilities ()
 
Render context access
void overrideContext (const RenderContext &context)
 
void resetContext ()
 
const RenderContextgetNativeContext () const
 
- Protected Member Functions inherited from eq::fabric::Object
EQFABRIC_API Object ()
 Construct a new Object. More...
 
EQFABRIC_API Object (const Object &)
 Construct an unmapped, unregistered copy of an object. More...
 
virtual EQFABRIC_API ~Object ()
 Destruct the object. More...
 
EQFABRIC_API Objectoperator= (const Object &from)
 NOP assignment operator. More...
 
virtual bool hasMasterUserData ()
 
virtual uint32_t getUserDataLatency () const
 
EQFABRIC_API void setTasks (const uint32_t tasks)
 
EQFABRIC_API void notifyDetach () override
 
EQFABRIC_API void serialize (co::DataOStream &os, const uint64_t dirtyBits) override
 
EQFABRIC_API void deserialize (co::DataIStream &is, const uint64_t dirtyBits) override
 
EQFABRIC_API void postRemove (Object *child)
 
virtual void removeChild (const uint128_t &)
 
template<class C , class S >
void commitChild (C *child, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChild (C *child, const uint32_t incarnation)
 
template<class C , class S >
void commitChildren (const std::vector< C * > &children, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, const uint32_t incarnation)
 
template<class C >
void syncChildren (const std::vector< C * > &children)
 
template<class P , class C >
void releaseChildren (const std::vector< C * > &children)
 
EQFABRIC_API bool _cmdSync (co::ICommand &command)
 
EQFABRIC_API void updateEvent (Event &event, int64_t time)
 

Attributes

enum  IAttribute { IATTR_HINT_STATISTICS, IATTR_HINT_SENDTOKEN, IATTR_LAST, IATTR_ALL = IATTR_LAST + 5 }
 Integer attributes for a channel. More...
 
enum  SAttribute { SATTR_DUMP_IMAGE, SATTR_LAST, SATTR_ALL = SATTR_LAST + 5 }
 String attributes. More...
 
EQFABRIC_INL int32_t getIAttribute (const IAttribute attr) const
 
EQFABRIC_INL const std::string & getSAttribute (const SAttribute attr) const
 
static EQFABRIC_INL const std::string & getIAttributeString (const IAttribute attr)
 
static EQFABRIC_INL const std::string & getSAttributeString (const SAttribute attr)
 

Detailed Description

template<class W, class C>
class eq::fabric::Channel< W, C >

Base data transport class for channels.

See also
eq::Channel

Definition at line 34 of file fabric/channel.h.

Member Enumeration Documentation

template<class W, class C>
enum eq::fabric::Channel::IAttribute

Integer attributes for a channel.

Version
1.0
Enumerator
IATTR_HINT_STATISTICS 

Statistics gathering mode (OFF, FASTEST [ON], NICEST)

IATTR_HINT_SENDTOKEN 

Use a send token for output frames (OFF, ON)

Definition at line 279 of file fabric/channel.h.

template<class W, class C>
enum eq::fabric::Channel::SAttribute

String attributes.

Definition at line 290 of file fabric/channel.h.

Member Function Documentation

template<class W, class C>
EQFABRIC_INL VisitorResult eq::fabric::Channel< W, C >::accept ( Visitor visitor)

Perform a depth-first traversal of this channel.

Parameters
visitorthe visitor.
Returns
the result of the visitor traversal.
Version
1.0

Referenced by eq::fabric::Channel< Window, Channel >::hasFixedViewport().

+ Here is the caller graph for this function:

template<class W, class C>
EQFABRIC_INL VisitorResult eq::fabric::Channel< W, C >::accept ( Visitor visitor) const

Const-version of accept().

Version
1.0
template<class W, class C>
EQFABRIC_INL uint64_t eq::fabric::Channel< W, C >::getCapabilities ( ) const
Returns
the supported capabilities.
Version
1.0

Referenced by eq::fabric::Channel< Window, Channel >::hasFixedViewport().

+ Here is the caller graph for this function:

template<class W, class C>
const RenderContext& eq::fabric::Channel< W, C >::getContext ( ) const
inline
Returns
the current render context.

Definition at line 272 of file fabric/channel.h.

template<class W, class C>
uint32_t eq::fabric::Channel< W, C >::getDrawBuffer ( ) const
inline
Returns
the current draw buffer for glDrawBuffer.
Version
1.0

Definition at line 139 of file fabric/channel.h.

template<class W, class C>
const ColorMask& eq::fabric::Channel< W, C >::getDrawBufferMask ( ) const
inline
Returns
the current color mask for glColorMask.
Version
1.0

Definition at line 143 of file fabric/channel.h.

template<class W, class C>
Eye eq::fabric::Channel< W, C >::getEye ( ) const
inline
Returns
the currently rendered eye pass.
Version
1.0

Definition at line 266 of file fabric/channel.h.

template<class W, class C>
const Frustumf& eq::fabric::Channel< W, C >::getFrustum ( ) const
inline
Returns
the current frustum for glFrustum or glOrtho.
Version
1.0

Definition at line 162 of file fabric/channel.h.

template<class W, class C>
const Matrix4f& eq::fabric::Channel< W, C >::getHeadTransform ( ) const
inline

Return the view matrix.

The view matrix is part of the GL_MODEL*VIEW* matrix, and is typically applied first to the GL_MODELVIEW matrix.

Returns
the head transformation matrix
Version
1.0

Definition at line 186 of file fabric/channel.h.

template<class W, class C>
EQFABRIC_INL int32_t eq::fabric::Channel< W, C >::getIAttribute ( const IAttribute  attr) const
Returns
the value of an integer attribute.
Version
1.0
template<class W, class C>
static EQFABRIC_INL const std::string& eq::fabric::Channel< W, C >::getIAttributeString ( const IAttribute  attr)
static
Returns
the name of an integer attribute.
Version
1.7.2
template<class W, class C>
const PixelViewport& eq::fabric::Channel< W, C >::getNativePixelViewport ( ) const
inline
Returns
the native pixel viewport.
Version
1.0

Definition at line 74 of file fabric/channel.h.

template<class W, class C>
const Frustumf& eq::fabric::Channel< W, C >::getOrtho ( ) const
inline
Returns
the current orthographic frustum for glOrtho.
Version
1.0

Definition at line 176 of file fabric/channel.h.

Referenced by eq::fabric::Channel< Window, Channel >::getFrustum().

+ Here is the caller graph for this function:

template<class W, class C>
const Matrix4f& eq::fabric::Channel< W, C >::getOrthoTransform ( ) const
inline

Return the orthographic view matrix.

The view matrix is part of the GL_MODEL*VIEW* matrix, and is typically applied first to the GL_MODELVIEW matrix.

Returns
the head transformation matrix
Version
1.0

Definition at line 214 of file fabric/channel.h.

Referenced by eq::fabric::Channel< Window, Channel >::getHeadTransform().

+ Here is the caller graph for this function:

template<class W, class C>
const Vector4i& eq::fabric::Channel< W, C >::getOverdraw ( ) const
inline
Warning
Undocumented - may not be supported in the future

Definition at line 268 of file fabric/channel.h.

template<class W, class C>
uint32_t eq::fabric::Channel< W, C >::getPeriod ( ) const
inline
Returns
the DPlex period for the current rendering task.
Version
1.0

Definition at line 248 of file fabric/channel.h.

template<class W, class C>
const Frustumf& eq::fabric::Channel< W, C >::getPerspective ( ) const
inline
Returns
the current perspective frustum for glFrustum.
Version
1.0

Definition at line 171 of file fabric/channel.h.

Referenced by eq::fabric::Channel< Window, Channel >::getFrustum().

+ Here is the caller graph for this function:

template<class W, class C>
const Matrix4f& eq::fabric::Channel< W, C >::getPerspectiveTransform ( ) const
inline

Return the perspective view matrix.

The view matrix is part of the GL_MODEL*VIEW* matrix, and is typically applied first to the GL_MODELVIEW matrix.

Returns
the head transformation matrix
Version
1.0

Definition at line 200 of file fabric/channel.h.

Referenced by eq::fabric::Channel< Window, Channel >::getHeadTransform().

+ Here is the caller graph for this function:

template<class W, class C>
uint32_t eq::fabric::Channel< W, C >::getPhase ( ) const
inline
Returns
the DPlex phase for the current rendering task.
Version
1.0

Definition at line 253 of file fabric/channel.h.

template<class W, class C>
const Pixel& eq::fabric::Channel< W, C >::getPixel ( ) const
inline
Returns
the pixel decomposition for the current rendering task.
Version
1.0

Definition at line 233 of file fabric/channel.h.

template<class W, class C>
const Vector2i& eq::fabric::Channel< W, C >::getPixelOffset ( ) const
inline

Get the channel's current position wrt the destination channel.

Note that computing this value from the current viewport and pixel viewport is inaccurate because it neglects rounding errors of the pixel viewport done by the server.

Returns
the channel's current position wrt the destination channel.
Version
1.0

Definition at line 264 of file fabric/channel.h.

template<class W, class C>
const PixelViewport& eq::fabric::Channel< W, C >::getPixelViewport ( ) const
inline
Returns
the current pixel viewport for glViewport and glScissor.
Version
1.0

Definition at line 148 of file fabric/channel.h.

template<class W, class C>
const Range& eq::fabric::Channel< W, C >::getRange ( ) const
inline
Returns
the database range for the current rendering task.
Version
1.0

Definition at line 228 of file fabric/channel.h.

template<class W, class C>
uint32_t eq::fabric::Channel< W, C >::getReadBuffer ( ) const
inline
Returns
the current read buffer for glReadBuffer.
Version
1.0

Definition at line 141 of file fabric/channel.h.

template<class W, class C>
EQFABRIC_INL const std::string& eq::fabric::Channel< W, C >::getSAttribute ( const SAttribute  attr) const
Returns
the value of a string attribute.
Version
1.7.2
template<class W, class C>
static EQFABRIC_INL const std::string& eq::fabric::Channel< W, C >::getSAttributeString ( const SAttribute  attr)
static
Returns
the name of an string attribute.
Version
1.7.2
template<class W, class C>
const SubPixel& eq::fabric::Channel< W, C >::getSubPixel ( ) const
inline
Returns
the subpixel decomposition for the current rendering task.
Version
1.0

Definition at line 238 of file fabric/channel.h.

template<class W, class C>
uint32_t eq::fabric::Channel< W, C >::getTaskID ( ) const
inline
Warning
Undocumented - may not be supported in the future

Definition at line 270 of file fabric/channel.h.

template<class W, class C>
const Viewport& eq::fabric::Channel< W, C >::getViewport ( ) const
inline
Returns
the fractional viewport wrt the destination view.
Version
1.0

Definition at line 223 of file fabric/channel.h.

template<class W, class C>
W* eq::fabric::Channel< W, C >::getWindow ( )
inline
Returns
the parent window.
Version
1.0

Definition at line 46 of file fabric/channel.h.

template<class W, class C>
const W* eq::fabric::Channel< W, C >::getWindow ( ) const
inline
Returns
the parent window.
Version
1.0

Definition at line 48 of file fabric/channel.h.

template<class W, class C>
const Zoom& eq::fabric::Channel< W, C >::getZoom ( ) const
inline
Returns
the up/downscale zoom factor for the current rendering task.
Version
1.0

Definition at line 243 of file fabric/channel.h.

template<class W, class C>
bool eq::fabric::Channel< W, C >::hasFixedViewport ( ) const
inline
Returns
true if a viewport was specified last.
Version
1.0

Definition at line 80 of file fabric/channel.h.

template<class W, class C>
EQFABRIC_INL void eq::fabric::Channel< W, C >::setCapabilities ( const uint64_t  bitmask)

Set the capabilities supported by the channel.

Channel which do not support all capabilities required by the current destination view do not execute any tasks. The capabilities are an application-defined bit mask. By default all bits are set.

Version
1.0

Referenced by eq::fabric::Channel< Window, Channel >::hasFixedViewport().

+ Here is the caller graph for this function:

template<class W, class C>
EQFABRIC_INL void eq::fabric::Channel< W, C >::setNearFar ( const float  nearPlane,
const float  farPlane 
)

Set the near and far planes for this channel.

The given near and far planes update the current perspective and orthographics frustum accordingly. Furthermore, they will be used in the future by the server to compute the frusta.

Parameters
nearPlanethe near plane.
farPlanethe far plane.
Version
1.0

Referenced by eq::fabric::Channel< Window, Channel >::hasFixedViewport().

+ Here is the caller graph for this function:

template<class W, class C>
virtual bool eq::fabric::Channel< W, C >::useOrtho ( ) const
inlinevirtual

Select perspective or orthographic rendering.

Influences the behaviour of getFrustum, getHeadTransform and the corresponding apply methods in eq::Channel. Intended to be overwritten by the implementation to select orthographic rendering.

Version
1.0

Definition at line 157 of file fabric/channel.h.

Referenced by eq::fabric::Channel< Window, Channel >::getFrustum(), and eq::fabric::Channel< Window, Channel >::getHeadTransform().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: