GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_state.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3  This file is part of the GLC-lib library.
4  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
5  http://glc-lib.sourceforge.net
6 
7  GLC-lib is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  GLC-lib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with GLC-lib; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21 *****************************************************************************/
22 
24 
25 #ifndef GLC_STATE_H_
26 #define GLC_STATE_H_
27 
28 #include <QString>
29 
30 #include "glc_cachemanager.h"
31 
32 #include "glc_config.h"
33 
36 
40 
42 {
43 private:
44  GLC_State();
45 public:
46  ~GLC_State();
47 
49 
51 
52 public:
54  static bool vboSupported();
55 
57  static bool vboUsed();
58 
60  static bool glslSupported();
61 
63  static bool frameBufferSupported();
64 
66  static bool frameBufferBlitSupported();
67 
69  static bool glslUsed();
70 
72  static bool pointSpriteSupported();
73 
75  static bool selectionShaderUsed();
76 
78  static bool isInSelectionMode();
79 
81  static QString version();
82 
84  static QString vendor();
85 
87  static QString renderer();
88 
90  static bool vendorIsNvidia();
91 
93  static bool isPixelCullingActivated();
94 
96  static bool cacheIsUsed();
97 
99  static GLC_CacheManager& currentCacheManager();
100 
102  static bool isSpacePartitionningActivated();
103 
105  static int defaultOctreeDepth();
106 
108  static bool isFrustumCullingActivated();
109 
111  static bool isValid();
113 
115 
117 
118 public:
120  static void init();
121 
123  static void setVboSupport();
124 
126  static void setVboUsage(const bool);
127 
129  static void setGlslSupport();
130 
132  static void setPointSpriteSupport();
133 
135  static void setFrameBufferSupport();
136 
138  static void setFrameBufferBlitSupport();
139 
141  static void setGlslUsage(const bool);
142 
144  static void setSelectionShaderUsage(const bool);
145 
147  static void setSelectionMode(const bool);
148 
150  static void setPixelCullingUsage(const bool);
151 
153  static void setCacheUsage(const bool);
154 
156  static void setCurrentCacheManager(const GLC_CacheManager&);
157 
159  static void setSpacePartionningUsage(const bool);
160 
162  static void setDefaultOctreeDepth(int);
163 
165  static void setFrustumCullingUsage(bool);
166 
168 
170 //Private attributes
172 private:
174  static bool m_VboSupported;
175 
177  static bool m_UseVbo;
178 
180  static bool m_GlslSupported;
181 
184 
186  static bool m_UseShader;
187 
189  static bool m_UseSelectionShader;
190 
192  static bool m_IsInSelectionMode;
193 
196 
198  static QString m_Version;
199 
201  static QString m_Vendor;
202 
204  static QString m_Renderer;
205 
207  static bool m_UseCache;
208 
211 
214 
217 
220 
223 
225  static bool m_IsValid;
226 
227 };
228 
229 #endif /*GLC_STATE_H_*/

©2005-2013 Laurent Ribon