26 #include <eq/fabric/channel.h>
30 namespace detail {
class Channel;
struct RBStat; }
54 EQ_API co::CommandQueue* getPipeThreadQueue();
55 EQ_API co::CommandQueue* getCommandThreadQueue();
56 EQ_API uint32_t getCurrentFrame()
const;
59 bool waitFrameFinished( uint32_t frame, uint32_t timeout )
const;
128 EQ_API
void addStatistic( Event& event );
145 EQ_API
virtual Vector2f
getJitter()
const;
297 EQ_API
virtual void declareRegion(
const eq::PixelViewport& region );
332 EQ_API EventOCommand
sendError(
const uint32_t error );
360 void changeLatency(
const uint32_t latency );
392 EQ_API
void attach(
const uint128_t&
id,
const uint32_t instanceID );
402 EQ_API
void startFrame(
const uint32_t frameNumber );
451 EQ_API
virtual bool configInit(
const uint128_t& initID );
467 EQ_API
virtual void frameStart(
const uint128_t& frameID,
468 const uint32_t frameNumber );
480 EQ_API
virtual void frameFinish(
const uint128_t& frameID,
481 const uint32_t frameNumber );
494 const uint32_t frameNumber );
504 EQ_API
virtual void frameClear(
const uint128_t& frameID );
514 EQ_API
virtual void frameDraw(
const uint128_t& frameID );
596 detail::Channel*
const _impl;
601 void _overrideContext( RenderContext& context );
604 void _initDrawableConfig();
607 void _frameTiles( RenderContext& context,
const bool isLocal,
608 const uint128_t& queueID,
const uint32_t tasks,
609 const co::ObjectVersions& frames );
612 void _refFrame(
const uint32_t frameNumber );
615 void _unrefFrame(
const uint32_t frameNumber );
618 void _transmitImage(
const co::ObjectVersion& frameDataVersion,
619 const uint128_t& nodeID,
620 const co::NodeID& netNodeID,
621 const uint64_t imageIndex,
622 const uint32_t frameNumber,
623 const uint32_t taskID );
625 void _frameReadback(
const uint128_t& frameID,
626 const co::ObjectVersions& frames );
627 void _finishReadback(
const co::ObjectVersion& frameDataVersion,
628 const uint64_t imageIndex,
629 const uint32_t frameNumber,
630 const uint32_t taskID,
631 const std::vector< uint128_t >& nodes,
632 const co::NodeIDs& netNodes );
634 bool _asyncFinishReadback(
const std::vector< size_t >& imagePos,
637 void _asyncTransmit(
FrameDataPtr frame,
const uint32_t frameNumber,
638 const uint64_t image,
639 const std::vector< uint128_t >& nodes,
640 const co::NodeIDs& netNodes,
641 const uint32_t taskID );
643 void _setReady(
const bool async, detail::RBStat* stat,
645 void _asyncSetReady(
const FrameDataPtr frame, detail::RBStat* stat,
646 const std::vector< uint128_t >& nodes,
647 const co::NodeIDs& netNodes );
649 void _setReady(
FrameDataPtr frame, detail::RBStat* stat,
650 const std::vector< uint128_t >& nodes,
651 const co::NodeIDs& netNodes );
654 co::QueueSlave* _getQueue(
const uint128_t& queueID );
656 Frames _getFrames(
const co::ObjectVersions& frameIDs,
657 const bool isOutput );
659 void _createTransferWindow();
660 void _deleteTransferWindow();
663 bool _cmdConfigInit( co::ICommand& command );
664 bool _cmdConfigExit( co::ICommand& command );
665 bool _cmdFrameStart( co::ICommand& command );
666 bool _cmdFrameFinish( co::ICommand& command );
667 bool _cmdFrameClear( co::ICommand& command );
668 bool _cmdFrameDraw( co::ICommand& command );
669 bool _cmdFrameDrawFinish( co::ICommand& command );
670 bool _cmdFrameAssemble( co::ICommand& command );
671 bool _cmdFrameReadback( co::ICommand& command );
672 bool _cmdFinishReadback( co::ICommand& command );
673 bool _cmdFrameSetReady( co::ICommand& command );
674 bool _cmdFrameTransmitImage( co::ICommand& command );
675 bool _cmdFrameSetReadyNode( co::ICommand& command );
676 bool _cmdFrameViewStart( co::ICommand& command );
677 bool _cmdFrameViewFinish( co::ICommand& command );
678 bool _cmdStopFrame( co::ICommand& command );
679 bool _cmdFrameTiles( co::ICommand& command );
680 bool _cmdCreateTransferWindow( co::ICommand& command );
681 bool _cmdDeleteTransferWindow( co::ICommand& command );
683 LB_TS_VAR( _pipeThread );
687 #endif // EQ_CHANNEL_H
virtual EQ_API void frameFinish(const uint128_t &frameID, const uint32_t frameNumber)
Finish rendering a frame.
virtual EQ_API Vector2f getJitter() const
virtual EQ_API void applyColorMask() const
Apply the current color mask.
EQ_API EventOCommand sendError(const uint32_t error)
Send a channel error event to the application node.
virtual EQ_API void frameReadback(const uint128_t &frameID, const Frames &frames)
Read back the rendered frame buffer into the output frames.
virtual EQ_API void outlineViewport()
Outline the current pixel viewport.
A channel represents a two-dimensional viewport within a Window.
A configuration is a visualization session driven by an application.
virtual EQ_API void frameStart(const uint128_t &frameID, const uint32_t frameNumber)
Start rendering a frame.
virtual EQ_API void applyOrthoTransform() const
Apply the transformation to position the orthographic view frustum.
EQ_API void applyScreenFrustum() const
Apply an orthographic frustum for pixel-based 2D operations.
virtual EQ_API bool configInit(const uint128_t &initID)
Initialize this channel.
virtual EQ_API void frameDrawFinish(const uint128_t &frameID, const uint32_t frameNumber)
Finish drawing.
virtual EQ_API void frameDraw(const uint128_t &frameID)
Draw the scene.
virtual void frameTilesStart(const uint128_t &)
Start a batch of tile rendering operations.
A Pipe represents a graphics card (GPU) on a Node.
EQ_API ServerPtr getServer()
A Node represents a single computer in the cluster.
virtual EQ_API std::string getDumpImageFileName() const
EQ_API void bindFrameBuffer()
Rebind the window frame buffer.
A set of settings to setup an eq::SystemWindow.
virtual EQ_API void applyOrtho() const
Apply the orthographic frustum matrix for the current rendering task.
std::vector< PixelViewport > PixelViewports
A vector of eq::PixelViewport.
virtual EQ_API void applyViewport() const
Apply the OpenGL viewport for the current rendering task.
virtual EQ_API void applyFrustum() const
Apply the frustum matrix for the current rendering task.
EQ_API void releaseFrameLocal(const uint32_t frameNumber)
Release the local synchronization of the parent for a frame.
EQ_API Frustumf getScreenFrustum() const
Returns an orthographic frustum for 2D operations on the view.
EQ_API void startFrame(const uint32_t frameNumber)
Start a frame by unlocking all child resources.
lunchbox::RefPtr< Server > ServerPtr
A reference-counted pointer to an eq::Server.
EQ_API void bindDrawFrameBuffer()
Rebind the window draw buffer.
EQ_API util::ObjectManager & getObjectManager()
A Window represents an on-screen or off-screen drawable.
EQ_API Config * getConfig()
EQ_API const GLEWContext * glewGetContext() const
Get the GLEW context for this channel.
virtual EQ_API void frameViewStart(const uint128_t &frameID)
Start updating a destination channel.
EQ_API Channel(Window *parent)
Construct a new channel.
virtual EQ_API void notifyStopFrame(const uint32_t lastFrameNumber)
Notify interruption of the rendering.
virtual EQ_API void applyPerspectiveTransform() const
Apply the transformation to position the perspective view frustum.
The result image listener gets notified on new images produced by destination channels.
EQ_API const Vector3ub & getUniqueColor() const
virtual EQ_API void applyHeadTransform() const
Apply the transformation to position the view frustum.
EQ_API View * getNativeView()
Get the channel's native view.
virtual EQ_API void frameClear(const uint128_t &frameID)
Clear the frame buffer.
virtual EQ_API void drawStatistics()
Draw a statistics overlay.
EQ_API const DrawableConfig & getDrawableConfig() const
virtual EQ_API bool configExit()
Exit this channel.
std::vector< Frame * > Frames
A vector of pointers to eq::Frame.
EQ_API void addResultImageListener(ResultImageListener *listener)
Add a listener that gets notified everytime a new frame was rendered for a destination channel...
A View is a 2D area of a Layout.
virtual EQ_API void notifyViewportChanged()
Notification that parameters influencing the vp/pvp have changed.
virtual EQ_API void resetRegions()
Reset the declared regions of interest.
Base data transport class for windows.
EQ_API View * getView()
Get the channel's current View.
virtual EQ_API bool processEvent(const Event &event)
Process a received event.
virtual void frameTilesFinish(const uint128_t &)
Finish a batch of tile rendering operations.
EQ_API bool isStopped() const
virtual EQ_API void frameViewFinish(const uint128_t &frameID)
Finish updating a destination channel.
EQ_API void removeResultImageListener(ResultImageListener *listener)
Remove a result image listener to stop receival of notifications on new images.
A facility class to manage OpenGL objects across shared contexts.
Base data transport class for channels.
virtual EQ_API void setupAssemblyState()
Setup the OpenGL state for a readback or assemble operation.
virtual EQ_API void applyPerspective() const
Apply the perspective frustum matrix for the current rendering task.
virtual EQ_API void applyBuffer()
Apply the current rendering buffer, including the color mask.
EQ_API PixelViewport getRegion() const
lunchbox::RefPtr< FrameData > FrameDataPtr
A reference-counted pointer to an eq::FrameData.
virtual EQ_API void frameAssemble(const uint128_t &frameID, const Frames &frames)
Assemble all input frames.
virtual EQ_API void resetAssemblyState()
Reset the OpenGL state after an assembly operation.
EQ_API const PixelViewports & getRegions() const
Get the current regions of interest.
virtual EQ_API ~Channel()
Destruct the channel.
EQ_API void releaseFrame(const uint32_t frameNumber)
Signal the completion of a frame to the parent.
virtual EQ_API void declareRegion(const eq::PixelViewport ®ion)
Declare a region covered by the current draw or assemble operation.