Line data Source code
1 :
2 : /* Copyright (c) 2007-2013, Stefan Eilemann <eile@equalizergraphics.com>
3 : *
4 : * This library is free software; you can redistribute it and/or modify it under
5 : * the terms of the GNU Lesser General Public License version 2.1 as published
6 : * by the Free Software Foundation.
7 : *
8 : * This library is distributed in the hope that it will be useful, but WITHOUT
9 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 : * details.
12 : *
13 : * You should have received a copy of the GNU Lesser General Public License
14 : * along with this library; if not, write to the Free Software Foundation, Inc.,
15 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 : */
17 :
18 : #include "compoundUpdateDataVisitor.h"
19 :
20 : #include "compound.h"
21 :
22 : namespace eq
23 : {
24 : namespace server
25 : {
26 : using fabric::TASK_DRAW;
27 :
28 0 : CompoundUpdateDataVisitor::CompoundUpdateDataVisitor(
29 : const uint32_t frameNumber )
30 0 : : _frameNumber( frameNumber )
31 0 : {}
32 :
33 0 : VisitorResult CompoundUpdateDataVisitor::visit( Compound* compound )
34 : {
35 0 : compound->fireUpdatePre( _frameNumber );
36 0 : compound->updateInheritData( _frameNumber );
37 :
38 0 : _updateDrawFinish( compound );
39 0 : return TRAVERSE_CONTINUE;
40 : }
41 :
42 :
43 0 : void CompoundUpdateDataVisitor::_updateDrawFinish( Compound* compound )
44 : {
45 0 : if( compound->testInheritTask( TASK_DRAW ) && compound->isActive( ))
46 : {
47 0 : Channel* channel = compound->getChannel();
48 0 : channel->setLastDrawCompound( compound );
49 : }
50 0 : }
51 :
52 : }
53 84 : }
|