Equalizer  1.4.1
drawableConfig.h
00001 
00002 /* Copyright (c) 2005-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 EQ_DRAWABLECONFIG_H
00019 #define EQ_DRAWABLECONFIG_H
00020 
00021 #include <iostream>
00022 
00023 namespace eq
00024 {
00025 namespace fabric
00026 {
00028     struct DrawableConfig
00029     {
00030         DrawableConfig()
00031                 : stencilBits(0), colorBits(0), alphaBits(0), accumBits(0)
00032                 , glVersion( 0.f ), stereo( false ), doublebuffered( false ) {}
00033 
00034         int32_t stencilBits;    
00035         int32_t colorBits;      
00036         int32_t alphaBits;      
00037         int32_t accumBits;      
00038         float   glVersion;      
00039         bool    stereo;         
00040         bool    doublebuffered; 
00041     };
00042 
00043     inline std::ostream& operator << ( std::ostream& os,
00044                                        const DrawableConfig& config )
00045     {
00046         os << "GL" << config.glVersion;
00047         os << "|rgb" << config.colorBits;
00048         if( config.alphaBits )
00049             os << "a" << config.alphaBits;
00050         if( config.stencilBits )
00051             os << "|st" << config.stencilBits;
00052         if( config.accumBits )
00053             os << "|acc" << config.accumBits;
00054         if( config.doublebuffered )
00055             os << "|DB";
00056         if( config.stereo )
00057             os << "|ST";
00058         return os;
00059     }
00060 
00061 }
00062 }
00063 #endif // EQ_DRAWABLECONFIG_H
00064 
Generated on Mon Nov 26 2012 14:41:48 for Equalizer 1.4.1 by  doxygen 1.7.6.1