Equalizer  1.6.1
eqPly/pipe.cpp
1 
2 /*
3  * Copyright (c) 2006-2010, Stefan Eilemann <eile@equalizergraphics.com>
4  * 2010, Cedric Stalder <cedric.stalder@gmail.com>
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * - Redistributions of source code must retain the above copyright notice, this
10  * list of conditions and the following disclaimer.
11  * - Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  * - Neither the name of Eyescale Software GmbH nor the names of its
15  * contributors may be used to endorse or promote products derived from this
16  * software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29 
30  */
31 
32 #include "pipe.h"
33 
34 #include "config.h"
35 #include <eq/eq.h>
36 
37 namespace eqPly
38 {
40 {
41  const Config* config = static_cast<const Config*>( getConfig( ));
42  return config->getInitData().getWindowSystem();
43 }
44 
45 bool Pipe::configInit( const eq::uint128_t& initID )
46 {
47  if( !eq::Pipe::configInit( initID ))
48  return false;
49 
50  Config* config = static_cast<Config*>( getConfig( ));
51  const InitData& initData = config->getInitData();
52  const eq::uint128_t& frameDataID = initData.getFrameDataID();
53 
54  return config->mapObject( &_frameData, frameDataID );
55 }
56 
58 {
59  eq::Config* config = getConfig();
60  config->unmapObject( &_frameData );
61 
62  return eq::Pipe::configExit();
63 }
64 
65 void Pipe::frameStart( const eq::uint128_t& frameID, const uint32_t frameNumber)
66 {
67  eq::Pipe::frameStart( frameID, frameNumber );
68  _frameData.sync( frameID );
69 }
70 }
A configuration is a visualization session driven by an application.
virtual void frameStart(const uint128_t &frameID, const uint32_t frameNumber)
Start rendering a frame.
virtual void unmapObject(co::Object *object)
Unmap a mapped object.
virtual void frameStart(const eq::uint128_t &frameID, const uint32_t frameNumber)
Start rendering a frame.
Definition: eqPly/pipe.cpp:65
Config * getConfig()
virtual bool mapObject(co::Object *object, const UUID &id, const uint128_t &version=co::VERSION_OLDEST)
Map a distributed object.
virtual bool configInit(const uint128_t &initID)
Initialize this pipe.
virtual eq::WindowSystem selectWindowSystem() const
Choose the window system to be used by this pipe.
Definition: eqPly/pipe.cpp:39
virtual bool configExit()
De-initialize this pipe.
Definition: eqPly/pipe.cpp:57
virtual bool configExit()
De-initialize this pipe.
The configuration, run be the EqPly application.
The list of possible window systems.
Definition: windowSystem.h:68
virtual bool configInit(const eq::uint128_t &initID)
Initialize this pipe.
Definition: eqPly/pipe.cpp:45