Equalizer  1.12.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 <lunchbox/referenced.h> // base class
23 #include <iostream>
24 
25 namespace eq
26 {
27 namespace fabric
28 {
37  class SwapBarrier : public lunchbox::Referenced
38  {
39  public:
43  SwapBarrier() : _nvSwapGroup( 0 ), _nvSwapBarrier( 0 ) {}
44 
47  void setName( const std::string& name ) { _name = name; }
48  const std::string getName() const { return _name; }
49 
50  uint32_t getNVSwapGroup() const { return _nvSwapGroup ; }
51  void setNVSwapGroup( uint32_t nvGroup ) { _nvSwapGroup = nvGroup; }
52 
53  uint32_t getNVSwapBarrier() const { return _nvSwapBarrier; }
54  void setNVSwapBarrier( uint32_t nvBarrier )
55  { _nvSwapBarrier = nvBarrier; }
56 
57  bool isNvSwapBarrier() const
58  { return ( _nvSwapBarrier || _nvSwapGroup ); }
60 
61  private:
62  std::string _name;
63 
64  uint32_t _nvSwapGroup;
65  uint32_t _nvSwapBarrier;
66  };
67 
68  EQFABRIC_API std::ostream& operator << ( std::ostream&, const SwapBarrier& );
69 }
70 }
71 #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
SwapBarrier()
Constructs a new SwapBarrier.
Definition: swapBarrier.h:43