Equalizer  1.13.0
Parallel Rendering Framework
drawableConfig.h
1 
2 /* Copyright (c) 2005-2015, Stefan Eilemann <eile@equalizergraphics.com>
3  * Daniel Nachbaur <danielnachbaur@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EQ_DRAWABLECONFIG_H
20 #define EQ_DRAWABLECONFIG_H
21 
22 #include <iostream>
23 
24 namespace eq
25 {
26 namespace fabric
27 {
30  {
32  : stencilBits(0), colorBits(0), alphaBits(0), accumBits(0)
33  , glVersion( 0.f ), glewGLVersion( 0.f ), stereo( false )
34  , doublebuffered( false ) , coreProfile( false ) {}
35 
36  int32_t stencilBits;
37  int32_t colorBits;
38  int32_t alphaBits;
39  int32_t accumBits;
40  float glVersion;
41  float glewGLVersion;
42  bool stereo;
44  bool coreProfile;
45  };
46 
47  inline std::ostream& operator << ( std::ostream& os,
48  const DrawableConfig& config )
49  {
50  os << "GL" << config.glVersion << "|GLEW" << config.glewGLVersion;
51  if( config.glVersion >= 3.2f )
52  os << (config.coreProfile ? "|Core" : "|Compat");
53  os << "|rgb" << config.colorBits;
54  if( config.alphaBits )
55  os << "a" << config.alphaBits;
56  if( config.stencilBits )
57  os << "|st" << config.stencilBits;
58  if( config.accumBits )
59  os << "|acc" << config.accumBits;
60  if( config.doublebuffered )
61  os << "|DB";
62  if( config.stereo )
63  os << "|ST";
64  return os;
65  }
66 }
67 }
68 
69 namespace lunchbox
70 {
71 template<> inline void byteswap( eq::fabric::DrawableConfig& value )
72 {
73  byteswap( value.stencilBits );
74  byteswap( value.colorBits );
75  byteswap( value.alphaBits );
76  byteswap( value.accumBits );
77  byteswap( value.glVersion );
78 }
79 }
80 #endif // EQ_DRAWABLECONFIG_H
bool coreProfile
Core or Compat profile (since OpenGL 3.2)
int32_t colorBits
Number of bits per color component.
int32_t alphaBits
Number of alpha bits.
bool stereo
Active stereo supported.
The Equalizer client library.
Definition: eq/agl/types.h:23
int32_t accumBits
Number of accumulation bits.
float glewGLVersion
OpenGL version (GLEW detected)
Stores the characteristics of a window's frame buffer configuration.
float glVersion
OpenGL version (glGetString( GL_VERSION ))
int32_t stencilBits
Number of stencil bits.
bool doublebuffered
Doublebuffering supported.