Equalizer  2.1.0
Parallel Rendering Framework
swapBarrier.h
1 
2 /* Copyright (c) 2006-2012, 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 #ifndef EQFABRIC_SWAPBARRIER_H
19 #define EQFABRIC_SWAPBARRIER_H
20 
21 #include <eq/fabric/api.h>
22 #include <iostream>
23 #include <lunchbox/referenced.h> // base class
24 
25 namespace eq
26 {
27 namespace fabric
28 {
37 class SwapBarrier : public lunchbox::Referenced
38 {
39 public:
44  : _nvSwapGroup(0)
45  , _nvSwapBarrier(0)
46  {
47  }
48 
51  void setName(const std::string& name) { _name = name; }
52  const std::string getName() const { return _name; }
53  uint32_t getNVSwapGroup() const { return _nvSwapGroup; }
54  void setNVSwapGroup(uint32_t nvGroup) { _nvSwapGroup = nvGroup; }
55  uint32_t getNVSwapBarrier() const { return _nvSwapBarrier; }
56  void setNVSwapBarrier(uint32_t nvBarrier) { _nvSwapBarrier = nvBarrier; }
57  bool isNvSwapBarrier() const { return (_nvSwapBarrier || _nvSwapGroup); }
59 
60 private:
61  std::string _name;
62 
63  uint32_t _nvSwapGroup;
64  uint32_t _nvSwapBarrier;
65 };
66 
67 EQFABRIC_API std::ostream& operator<<(std::ostream&, const SwapBarrier&);
68 }
69 }
70 #endif // EQFABRIC_SWAPBARRIER_H
A swapbarrier is set on a Compound to synchronize the swap buffer between windows.
Definition: swapBarrier.h:37
Defines export visibility macros for library EqualizerFabric.
The Equalizer client library.
Definition: eq/agl/types.h:23
std::ostream & operator<<(std::ostream &os, const AxisEvent &event)
Print the axis event to the given output stream.
Definition: axisEvent.h:49
SwapBarrier()
Constructs a new SwapBarrier.
Definition: swapBarrier.h:43