Equalizer  2.1.0
Parallel Rendering Framework
drawableConfig.h
1 
2 /* Copyright (c) 2005-2017, 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)
33  , colorBits(0)
34  , alphaBits(0)
35  , accumBits(0)
36  , glVersion(0.f)
37  , glewGLVersion(0.f)
38  , stereo(false)
39  , doublebuffered(false)
40  , coreProfile(false)
41  {
42  }
43 
44  int32_t stencilBits;
45  int32_t colorBits;
46  int32_t alphaBits;
47  int32_t accumBits;
48  float glVersion;
49  float glewGLVersion;
50  bool stereo;
52  bool coreProfile;
53 };
54 
55 inline std::ostream& operator<<(std::ostream& os, const DrawableConfig& config)
56 {
57  os << "GL" << config.glVersion << "|GLEW" << config.glewGLVersion;
58  if (config.glVersion >= 3.2f)
59  os << (config.coreProfile ? "|Core" : "|Compat");
60  os << "|rgb" << config.colorBits;
61  if (config.alphaBits)
62  os << "a" << config.alphaBits;
63  if (config.stencilBits)
64  os << "|st" << config.stencilBits;
65  if (config.accumBits)
66  os << "|acc" << config.accumBits;
67  if (config.doublebuffered)
68  os << "|DB";
69  if (config.stereo)
70  os << "|ST";
71  return os;
72 }
73 }
74 }
75 
76 #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
std::ostream & operator<<(std::ostream &os, const AxisEvent &event)
Print the axis event to the given output stream.
Definition: axisEvent.h:49
int32_t accumBits
Number of accumulation bits.
float glewGLVersion
OpenGL version (GLEW detected)
Stores the characteristics of a window&#39;s frame buffer configuration.
float glVersion
OpenGL version (glGetString( GL_VERSION ))
int32_t stencilBits
Number of stencil bits.
bool doublebuffered
Doublebuffering supported.