Equalizer  1.2.1
swapBarrier.h
00001 
00002 /* Copyright (c) 2006-2011, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQFABRIC_SWAPBARRIER_H
00019 #define EQFABRIC_SWAPBARRIER_H
00020 
00021 #include <eq/fabric/api.h>
00022 #include <co/base/referenced.h> // base class
00023 #include <iostream>
00024 
00025 namespace eq
00026 {
00027 namespace fabric
00028 {
00037     class SwapBarrier : public co::base::Referenced
00038     {
00039     public:
00043         SwapBarrier() : _nvSwapGroup( 0 ), _nvSwapBarrier( 0 ) {}
00044 
00047         void setName( const std::string& name ) { _name = name; }
00048         const std::string getName() const { return _name; }
00049 
00050         uint32_t getNVSwapGroup() const   { return _nvSwapGroup ; }
00051         void setNVSwapGroup( uint32_t nvGroup ) { _nvSwapGroup = nvGroup; }
00052 
00053         uint32_t getNVSwapBarrier() const { return _nvSwapBarrier; }
00054         void setNVSwapBarrier( uint32_t nvBarrier ) 
00055             { _nvSwapBarrier = nvBarrier; }
00056 
00057         bool isNvSwapBarrier() const
00058             { return ( _nvSwapBarrier || _nvSwapGroup ); }
00060 
00061     private:
00062         std::string _name;
00063 
00064         uint32_t _nvSwapGroup;
00065         uint32_t _nvSwapBarrier;
00066     };
00067 
00068     EQFABRIC_API std::ostream& operator << ( std::ostream&, const SwapBarrier& );
00069 }
00070 }
00071 #endif // EQFABRIC_SWAPBARRIER_H
Generated on Fri Jun 8 2012 15:44:32 for Equalizer 1.2.1 by  doxygen 1.8.0