/* * Copyright (c) 2006-2007, Stefan Eilemann * All rights reserved. * * The pipe object is responsible for maintaining the frame-specific data. The * identifier passed by the application contains the version of the frame data * corresponding to the rendered frame. The pipe's start frame callback * synchronizes the thread-local instance of the frame data to this version. */ #include "pipe.h" #include "node.h" #include using namespace eqBase; using namespace std; namespace eqPly { bool Pipe::configInit( const uint32_t initID ) { const Node* node = static_cast( getNode( )); const InitData& initData = node->getInitData(); const uint32_t frameDataID = initData.getFrameDataID(); eq::Config* config = getConfig(); const bool mapped = config->mapObject( &_frameData, frameDataID ); EQASSERT( mapped ); return eq::Pipe::configInit( initID ); } bool Pipe::configExit() { eq::Config* config = getConfig(); config->unmapObject( &_frameData ); return eq::Pipe::configExit(); } void Pipe::frameStart( const uint32_t frameID, const uint32_t frameNumber ) { _frameData.sync( frameID ); startFrame( frameNumber ); } }