glc_state.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  This file is part of the GLC-lib library.
00004  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
00005  http://glc-lib.sourceforge.net
00006 
00007  GLC-lib is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU Lesser General Public License as published by
00009  the Free Software Foundation; either version 3 of the License, or
00010  (at your option) any later version.
00011 
00012  GLC-lib is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU Lesser General Public License for more details.
00016 
00017  You should have received a copy of the GNU Lesser General Public License
00018  along with GLC-lib; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021 *****************************************************************************/
00022 
00024 
00025 #ifndef GLC_STATE_H_
00026 #define GLC_STATE_H_
00027 
00028 #include <QString>
00029 
00030 #include "glc_cachemanager.h"
00031 
00032 #include "glc_config.h"
00033 
00036 
00040 
00041 class GLC_LIB_EXPORT GLC_State
00042 {
00043 private:
00044         GLC_State();
00045 public:
00046         ~GLC_State();
00047 
00049 
00051 
00052 public:
00054         static bool vboSupported();
00055 
00057         static bool vboUsed();
00058 
00060         static bool glslSupported();
00061 
00063         static bool frameBufferSupported();
00064 
00066         static bool glslUsed();
00067 
00069         static bool pointSpriteSupported();
00070 
00072         static bool selectionShaderUsed();
00073 
00075         static bool isInSelectionMode();
00076 
00078         static QString version();
00079 
00081         static QString vendor();
00082 
00084         static QString renderer();
00085 
00087         static bool vendorIsNvidia();
00088 
00090         static bool isPixelCullingActivated();
00091 
00093         static bool cacheIsUsed();
00094 
00096         static GLC_CacheManager& currentCacheManager();
00097 
00099         static bool isSpacePartitionningActivated();
00100 
00102         static int defaultOctreeDepth();
00103 
00105         static bool isFrustumCullingActivated();
00106 
00108         static bool isValid();
00110 
00112 
00114 
00115 public:
00117         static void init();
00118 
00120         static void setVboSupport();
00121 
00123         static void setVboUsage(const bool);
00124 
00126         static void setGlslSupport();
00127 
00129         static void setPointSpriteSupport();
00130 
00132         static void setFrameBufferSupport();
00133 
00135         static void setGlslUsage(const bool);
00136 
00138         static void setSelectionShaderUsage(const bool);
00139 
00141         static void setSelectionMode(const bool);
00142 
00144         static void setPixelCullingUsage(const bool);
00145 
00147         static void setCacheUsage(const bool);
00148 
00150         static void setCurrentCacheManager(const GLC_CacheManager&);
00151 
00153         static void setSpacePartionningUsage(const bool);
00154 
00156         static void setDefaultOctreeDepth(int);
00157 
00159         static void setFrustumCullingUsage(bool);
00160 
00162 
00164 //Private attributes
00166 private:
00168         static bool m_VboSupported;
00169 
00171         static bool m_UseVbo;
00172 
00174         static bool m_GlslSupported;
00175 
00177         static bool m_PointSpriteSupported;
00178 
00180         static bool m_UseShader;
00181 
00183         static bool m_UseSelectionShader;
00184 
00186         static bool m_IsInSelectionMode;
00187 
00189         static bool m_IsPixelCullingActivated;
00190 
00192         static QString m_Version;
00193 
00195         static QString m_Vendor;
00196 
00198         static QString m_Renderer;
00199 
00201         static bool m_UseCache;
00202 
00204         static GLC_CacheManager m_CacheManager;
00205 
00207         static bool m_IsSpacePartitionningActivated;
00208 
00210         static bool m_IsFrustumCullingActivated;
00211 
00213         static bool m_IsFrameBufferSupported;
00214 
00216         static bool m_IsValid;
00217 
00218 };
00219 
00220 #endif /*GLC_STATE_H_*/

SourceForge.net Logo

©2005-2011 Laurent Ribon