20 #ifndef EQFABRIC_CHANNEL_H
21 #define EQFABRIC_CHANNEL_H
23 #include <eq/fabric/object.h>
24 #include <eq/fabric/paths.h>
25 #include <eq/fabric/renderContext.h>
26 #include <eq/fabric/types.h>
65 bool isDestination()
const
66 {
return _data.nativeContext.view.identifier != 0;}
69 void setViewVersion(
const co::ObjectVersion& view );
72 const co::ObjectVersion& getViewVersion()
const
73 {
return _data.nativeContext.view; }
76 void setPixelViewport(
const PixelViewport& pvp );
79 EQFABRIC_INL
void setViewport(
const Viewport& vp );
82 virtual void notifyViewportChanged();
86 {
return _data.nativeContext.pvp; }
102 EQFABRIC_INL
void setNearFar(
const float nearPlane,
const float farPlane );
138 void setOverdraw(
const Vector4i& overdraw );
139 const Vector2i& getMaxSize()
const {
return _maxSize; }
142 EQFABRIC_INL ChannelPath getPath()
const;
144 EQFABRIC_INL
virtual void backup();
145 EQFABRIC_INL
virtual void restore();
314 IATTR_ALL = IATTR_LAST + 5
322 SATTR_ALL = SATTR_LAST + 5
340 virtual bool omitOutput()
const {
return false; }
341 virtual void output( std::ostream& )
const {}
345 EQFABRIC_INL
Channel( W* parent );
354 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
355 const uint64_t dirtyBits );
357 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
358 const uint64_t dirtyBits );
361 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits );
363 void setDrawable(
const uint32_t drawable );
368 void overrideContext( RenderContext& context ) { _context = &context; }
371 void resetContext() { _context = &_data.nativeContext; }
374 const RenderContext& getContext()
const {
return *_context; }
377 const RenderContext& getNativeContext()
const
378 {
return _data.nativeContext; }
382 void setIAttribute(
const IAttribute attr,
const int32_t value )
383 { _iAttributes[attr] = value; setDirty( DIRTY_ATTRIBUTES ); }
386 void setSAttribute(
const SAttribute attr,
const std::string& value )
387 { _sAttributes[attr] = value; setDirty( DIRTY_ATTRIBUTES ); }
390 virtual ChangeType getChangeType()
const {
return UNBUFFERED; }
394 DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0,
395 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 1,
396 DIRTY_MEMBER = Object::DIRTY_CUSTOM << 2,
397 DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 3,
398 DIRTY_CAPABILITIES = Object::DIRTY_CUSTOM << 4,
400 DIRTY_ATTRIBUTES | DIRTY_VIEWPORT | DIRTY_MEMBER |
401 DIRTY_FRUSTUM | DIRTY_OBJECT_BITS
405 virtual uint64_t getRedistributableBits()
const
406 {
return DIRTY_CHANNEL_BITS; }
408 virtual void updateCapabilities() {}
416 BackupData() : capabilities( LB_BIT_ALL_64 ), fixedVP( true ) {}
419 RenderContext nativeContext;
422 uint64_t capabilities;
430 RenderContext* _context;
433 int32_t _iAttributes[IATTR_ALL];
436 std::string _sAttributes[SATTR_ALL];
448 template<
class W,
class C > EQFABRIC_INL
449 std::ostream& operator << ( std::ostream&, const Channel< W, C >& );
453 #endif // EQFABRIC_CHANNEL_H
uint32_t buffer
buffer as passed to glDrawBuffer()
const PixelViewport & getPixelViewport() const
A zoom specification with methods for manipulation.
uint32_t getDrawable() const
Use an FBO for depth values.
IAttribute
Possible values for integer attributes.
Use an FBO for stencil values.
EQFABRIC_INL uint64_t getCapabilities() const
Zoom zoom
up/downsampling wrt to dest
const Frustumf & getPerspective() const
uint32_t getPhase() const
static EQFABRIC_INL const std::string & getSAttributeString(const SAttribute attr)
A fractional viewport with methods for manipulation.
Holds a subpixel decomposition specification along with some methods for manipulation.
Defines which parts of the color buffer are to be written.
const PixelViewport & getNativePixelViewport() const
Range range
database-range wrt to dest channel
uint32_t getReadBuffer() const
bool hasFixedViewport() const
Viewport vp
fractional viewport wrt dest view
static EQFABRIC_INL const std::string & getIAttributeString(const IAttribute attr)
IAttribute
Integer attributes for a channel.
Drawable
The drawable format defines the components used as an alternate drawable for this channel...
A visitor to traverse leaf nodes of a graph.
const ColorMask & getDrawBufferMask() const
Pixel pixel
pixel decomposition wrt to dest
W Parent
The parent window type.
uint32_t period
DPlex period.
uint32_t getTaskID() const
vmml::vector< 4, int > Vector4i
A four-component integer vector.
EQFABRIC_INL void setNearFar(const float nearPlane, const float farPlane)
Set the near and far planes for this channel.
SubPixel subpixel
subpixel decomposition wrt to dest
const SubPixel & getSubPixel() const
const Vector2i & getPixelOffset() const
Get the channel's current position wrt the destination channel.
EQFABRIC_INL void setMaxSize(const Vector2i &size)
Eye
Eye pass bit mask for which is enabled.
ColorMask bufferMask
color mask for anaglyph stereo
uint32_t phase
DPlex phase.
SAttribute
String attributes.
virtual bool useOrtho() const
Select perspective or orthographic rendering.
Use a send token for output frames (OFF, ON)
EQFABRIC_INL int32_t getIAttribute(const IAttribute attr) const
uint32_t getPeriod() const
Matrix4f orthoTransform
orthographic frustum transform
const Viewport & getViewport() const
Holds a pixel decomposition specification with methods for manipulation.
const W * getWindow() const
vmml::matrix< 4, 4, float > Matrix4f
A 4x4 float matrix.
const Vector4i & getOverdraw() const
Matrix4f headTransform
frustum transform for modelview
const Matrix4f & getOrthoTransform() const
Return the orthographic view matrix.
Use the window's frame buffer.
LeafVisitor< C > Visitor
The channel visitor type.
EQFABRIC_INL Channel(W *parent)
Construct a new channel.
Use an FBO for color values.
const Zoom & getZoom() const
Vector2i offset
absolute position wrt dest channel
Frustumf ortho
ortho frustum for projection matrix
const Range & getRange() const
const Matrix4f & getHeadTransform() const
Return the view matrix.
const Frustumf & getFrustum() const
Base data transport class for channels.
uint32_t getDrawBuffer() const
vmml::frustum< float > Frustumf
A frustum definition.
PixelViewport pvp
pixel viewport of channel wrt window
const Pixel & getPixel() const
Statistics gathering mode (OFF, FASTEST [ON], NICEST)
virtual EQFABRIC_INL ~Channel()
Destruct the channel.
Internal base class for all distributed, inheritable Equalizer objects.
EQFABRIC_INL void setCapabilities(const uint64_t bitmask)
Set the capabilities supported by the channel.
Holds a 2D pixel viewport with methods for manipulation.
A fractional database range with methods for manipulation.
EQFABRIC_INL std::string getSAttribute(const SAttribute attr) const
const Frustumf & getOrtho() const
const Matrix4f & getPerspectiveTransform() const
Return the perspective view matrix.
vmml::vector< 2, int > Vector2i
A two-component integer vector.
Frustumf frustum
frustum for projection matrix
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Perform a depth-first traversal of this channel.