[svn] / trunk / src / examples / eqPly / pipe.cpp Repository:
ViewVC logotype

Annotation of /trunk/src/examples/eqPly/pipe.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1044 - (view) (download) (as text)

1 : eile 206
2 : eile 319 /*
3 : eile 736 * Copyright (c) 2006-2007, Stefan Eilemann <eile@equalizergraphics.com>
4 : eile 319 * All rights reserved.
5 :     *
6 :     * The pipe object is responsible for maintaining the frame-specific data. The
7 : eile 776 * identifier passed by the application contains the version of the frame data
8 :     * corresponding to the rendered frame. The pipe's start frame callback
9 :     * synchronizes the thread-local instance of the frame data to this version.
10 : eile 319 */
11 : eile 206
12 :     #include "pipe.h"
13 :    
14 : eile 776 #include "node.h"
15 :     #include <eq/eq.h>
16 :    
17 : eile 228 using namespace eqBase;
18 : eile 1044 using namespace std;
19 : eile 206
20 : eile 1044 namespace eqPly
21 :     {
22 : eile 836 bool Pipe::configInit( const uint32_t initID )
23 : eile 206 {
24 : eile 776 const Node* node = static_cast<Node*>( getNode( ));
25 :     const InitData& initData = node->getInitData();
26 :     const uint32_t frameDataID = initData.getFrameDataID();
27 :     eq::Config* config = getConfig();
28 : eile 206
29 : eile 776 const bool mapped = config->mapObject( &_frameData, frameDataID );
30 :     EQASSERT( mapped );
31 : eile 736
32 : eile 836 return eq::Pipe::configInit( initID );
33 : eile 206 }
34 : eile 228
35 : eile 836 bool Pipe::configExit()
36 : eile 228 {
37 : eile 776 eq::Config* config = getConfig();
38 :     config->unmapObject( &_frameData );
39 : eile 736
40 : eile 836 return eq::Pipe::configExit();
41 : eile 228 }
42 : eile 308
43 : eile 834 void Pipe::frameStart( const uint32_t frameID, const uint32_t frameNumber )
44 : eile 308 {
45 : eile 776 _frameData.sync( frameID );
46 : eile 834 startFrame( frameNumber );
47 : eile 308 }
48 : eile 566 }

Back to Equalizer website
ViewVC Help
Powered by ViewVC 1.0.3