GLC_State store GLC_lib state. More...
#include <glc_state.h>
Public Member Functions | |
| ~GLC_State () | |
Static Public Member Functions | |
Get Functions | |
| static bool | vboSupported () |
| Return true if VBO is supported. | |
| static bool | vboUsed () |
| Return true if VBO is used. | |
| static bool | glslSupported () |
| Return true if GLSL is supported. | |
| static bool | glslUsed () |
| Return true if GLSL is used. | |
| static bool | pointSpriteSupported () |
| Return true if Point Sprite is supported. | |
| static bool | selectionShaderUsed () |
| Return true if selection shader is used. | |
| static bool | isInSelectionMode () |
| Return true if is in selection mode. | |
| static QString | version () |
| Return the Opengl version. | |
| static QString | vendor () |
| Return the Opengl vendor. | |
| static QString | renderer () |
| Return the Opengl renderer. | |
| static bool | vendorIsNvidia () |
| Return true if OpenGL Vendor is NVIDIA. | |
| static bool | isPixelCullingActivated () |
| Return true if pixel culling is activate. | |
| static bool | cacheIsUsed () |
| Return true if the cache is used. | |
| static GLC_CacheManager & | currentCacheManager () |
| Return the current cache manager. | |
| static bool | isSpacePartitionningActivated () |
| Return true if space partitionning is used. | |
| static int | defaultOctreeDepth () |
| Return the default octree depth. | |
| static bool | isFrustumCullingActivated () |
| Return true if frustum culling is activated. | |
Set Functions | |
| static void | init () |
| Intialize the state. | |
| static void | setVboSupport () |
| Set VBO support. | |
| static void | setVboUsage (const bool) |
| Set VBO usage. | |
| static void | setGlslSupport () |
| Set GLSL support. | |
| static void | setPointSpriteSupport () |
| Set Point Sprite support. | |
| static void | setGlslUsage (const bool) |
| Set GLSL usage. | |
| static void | setSelectionShaderUsage (const bool) |
| Set selection shader usage. | |
| static void | setSelectionMode (const bool) |
| Set selection mode. | |
| static void | setPixelCullingUsage (const bool) |
| Set pixel culling state. | |
| static void | setCacheUsage (const bool) |
| Set the cache usage. | |
| static void | setCurrentCacheManager (const GLC_CacheManager &) |
| Set the current cache manager. | |
| static void | setSpacePartionningUsage (const bool) |
| Set space partionning usage. | |
| static void | setDefaultOctreeDepth (int) |
| Set the default octree depth. | |
| static void | setFrustumCullingUsage (bool) |
| Set the frustum culling usage. | |
Private Member Functions | |
| GLC_State () | |
Static Private Attributes | |
| static bool | m_VboSupported = false |
| VBO supported flag. | |
| static bool | m_UseVbo = true |
| VBO used. | |
| static bool | m_GlslSupported = false |
| GLSL supported flag. | |
| static bool | m_PointSpriteSupported = false |
| Point Sprite supported flag. | |
| static bool | m_UseShader = true |
| Use shader. | |
| static bool | m_UseSelectionShader = false |
| Use selectionShader flag. | |
| static bool | m_IsInSelectionMode = false |
| In selection mode. | |
| static bool | m_IsPixelCullingActivated = true |
| Pixel culling activation. | |
| static QString | m_Version |
| The Opengl card version. | |
| static QString | m_Vendor |
| The Opengl card vendor. | |
| static QString | m_Renderer |
| The Opengl card renderer. | |
| static bool | m_UseCache = false |
| Cache usage. | |
| static GLC_CacheManager | m_CacheManager |
| The current cache manager. | |
| static bool | m_IsSpacePartitionningActivated = false |
| Space partitionning activation. | |
| static bool | m_IsFrustumCullingActivated = false |
| Frustum culling activated. | |
GLC_State store GLC_lib state.
GLC_State is used to set and get glabal GLC_lib state
Definition at line 43 of file glc_state.h.
| GLC_State::GLC_State | ( | ) | [private] |
| GLC_State::~GLC_State | ( | ) |
Definition at line 51 of file glc_state.cpp.
| bool GLC_State::cacheIsUsed | ( | ) | [static] |
Return true if the cache is used.
Definition at line 115 of file glc_state.cpp.
References m_UseCache.
Referenced by GLC_3dxmlToWorld::create3DrepFrom3dxmlRep(), GLC_3dxmlToWorld::createReferenceRep(), GLC_3dxmlToWorld::loadCurrentExtRep(), GLC_3dxmlToWorld::loadExternalRef3D(), and GLC_3dxmlToWorld::loadExternRepresentations().
| GLC_CacheManager & GLC_State::currentCacheManager | ( | ) | [static] |
Return the current cache manager.
Definition at line 120 of file glc_state.cpp.
References m_CacheManager.
Referenced by GLC_3dxmlToWorld::create3DrepFrom3dxmlRep(), GLC_3dxmlToWorld::createReferenceRep(), GLC_3dxmlToWorld::loadCurrentExtRep(), GLC_3dxmlToWorld::loadExternalRef3D(), and GLC_3dxmlToWorld::loadExternRepresentations().
| int GLC_State::defaultOctreeDepth | ( | ) | [static] |
Return the default octree depth.
Definition at line 130 of file glc_state.cpp.
References GLC_Octree::defaultDepth().
| bool GLC_State::glslSupported | ( | ) | [static] |
Return true if GLSL is supported.
Definition at line 65 of file glc_state.cpp.
References m_GlslSupported.
| bool GLC_State::glslUsed | ( | ) | [static] |
Return true if GLSL is used.
Definition at line 70 of file glc_state.cpp.
References m_UseShader.
Referenced by GLC_3DWidgetManagerHandle::render().
| void GLC_State::init | ( | ) | [static] |
Intialize the state.
Definition at line 140 of file glc_state.cpp.
References m_Renderer, m_Vendor, m_Version, setGlslSupport(), setPointSpriteSupport(), and setVboSupport().
Referenced by GLC_Viewport::initGl().
| bool GLC_State::isFrustumCullingActivated | ( | ) | [static] |
Return true if frustum culling is activated.
Definition at line 135 of file glc_state.cpp.
References m_IsFrustumCullingActivated.
| bool GLC_State::isInSelectionMode | ( | ) | [static] |
Return true if is in selection mode.
Definition at line 85 of file glc_state.cpp.
References m_IsInSelectionMode.
Referenced by GLC_Mesh::activateVboAndIbo(), GLC_Mesh::activateVertexArray(), GLC_Mesh::bodySelectionRenderLoop(), GLC_Mesh::glDraw(), GLC_3DViewCollection::glDraw(), GLC_3DViewCollection::glDrawInstancesOf(), GLC_Viewport::glExecuteImagePlane(), GLC_Mesh::normalRenderLoop(), GLC_Mesh::primitiveSelectionRenderLoop(), GLC_PointSprite::render(), GLC_Geometry::render(), GLC_3DViewInstance::render(), GLC_3DViewCollection::render(), GLC_3DViewInstance::renderForBodySelection(), GLC_3DViewInstance::renderForPrimitiveSelection(), GLC_3DViewCollection::renderShaderGroup(), GLC_Shader::unuse(), and GLC_Shader::use().
| bool GLC_State::isPixelCullingActivated | ( | ) | [static] |
Return true if pixel culling is activate.
Definition at line 110 of file glc_state.cpp.
References m_IsPixelCullingActivated.
Referenced by GLC_3DViewInstance::choseLod(), and GLC_3DViewInstance::render().
| bool GLC_State::isSpacePartitionningActivated | ( | ) | [static] |
Return true if space partitionning is used.
Definition at line 125 of file glc_state.cpp.
References m_IsSpacePartitionningActivated.
| bool GLC_State::pointSpriteSupported | ( | ) | [static] |
Return true if Point Sprite is supported.
Definition at line 75 of file glc_state.cpp.
References m_PointSpriteSupported.
Referenced by GLC_PointSprite::render().
| QString GLC_State::renderer | ( | ) | [static] |
| bool GLC_State::selectionShaderUsed | ( | ) | [static] |
Return true if selection shader is used.
Definition at line 80 of file glc_state.cpp.
References m_UseSelectionShader.
Referenced by GLC_3DViewCollection::glDraw().
| void GLC_State::setCacheUsage | ( | const bool | cacheUsage | ) | [static] |
| void GLC_State::setCurrentCacheManager | ( | const GLC_CacheManager & | cacheManager | ) | [static] |
Set the current cache manager.
Definition at line 195 of file glc_state.cpp.
References m_CacheManager.
| void GLC_State::setDefaultOctreeDepth | ( | int | depth | ) | [static] |
Set the default octree depth.
Definition at line 205 of file glc_state.cpp.
References GLC_Octree::setDefaultDepth().
| void GLC_State::setFrustumCullingUsage | ( | bool | usage | ) | [static] |
Set the frustum culling usage.
Definition at line 210 of file glc_state.cpp.
References m_IsFrustumCullingActivated.
| void GLC_State::setGlslSupport | ( | ) | [static] |
Set GLSL support.
Definition at line 160 of file glc_state.cpp.
References glc::extensionIsSupported(), glc::loadGlSlExtension(), and m_GlslSupported.
Referenced by init().
| void GLC_State::setGlslUsage | ( | const bool | glslUsage | ) | [static] |
Set GLSL usage.
Definition at line 170 of file glc_state.cpp.
References m_GlslSupported, and m_UseShader.
| void GLC_State::setPixelCullingUsage | ( | const bool | activation | ) | [static] |
Set pixel culling state.
Definition at line 185 of file glc_state.cpp.
References m_IsPixelCullingActivated.
| void GLC_State::setPointSpriteSupport | ( | ) | [static] |
Set Point Sprite support.
Definition at line 165 of file glc_state.cpp.
References glc::extensionIsSupported(), glc::loadPointSpriteExtension(), and m_PointSpriteSupported.
Referenced by init().
| void GLC_State::setSelectionMode | ( | const bool | mode | ) | [static] |
Set selection mode.
Definition at line 180 of file glc_state.cpp.
References m_IsInSelectionMode.
Referenced by GLC_Viewport::renderAndSelect(), GLC_Viewport::selectBody(), GLC_Viewport::selectInsideSquare(), and GLC_Viewport::selectPrimitive().
| void GLC_State::setSelectionShaderUsage | ( | const bool | shaderUsed | ) | [static] |
Set selection shader usage.
Definition at line 175 of file glc_state.cpp.
References m_GlslSupported, and m_UseSelectionShader.
| void GLC_State::setSpacePartionningUsage | ( | const bool | usage | ) | [static] |
Set space partionning usage.
Definition at line 200 of file glc_state.cpp.
References m_IsSpacePartitionningActivated.
| void GLC_State::setVboSupport | ( | ) | [static] |
Set VBO support.
Definition at line 150 of file glc_state.cpp.
References glc::extensionIsSupported(), glc::loadVboExtension(), and m_VboSupported.
Referenced by init().
| void GLC_State::setVboUsage | ( | const bool | vboUsed | ) | [static] |
Set VBO usage.
Definition at line 155 of file glc_state.cpp.
References m_UseVbo, and m_VboSupported.
| bool GLC_State::vboSupported | ( | ) | [static] |
Return true if VBO is supported.
Definition at line 55 of file glc_state.cpp.
References m_VboSupported.
| bool GLC_State::vboUsed | ( | ) | [static] |
Return true if VBO is used.
Definition at line 60 of file glc_state.cpp.
References m_UseVbo.
Referenced by GLC_Mesh::finish(), GLC_Mesh::finishSerialized(), GLC_Mesh::getFansIndex(), GLC_Mesh::getStripsIndex(), GLC_Mesh::getTrianglesIndex(), GLC_WireData::glDraw(), GLC_Mesh::glDraw(), and operator<<().
| QString GLC_State::vendor | ( | ) | [static] |
| bool GLC_State::vendorIsNvidia | ( | ) | [static] |
Return true if OpenGL Vendor is NVIDIA.
Definition at line 105 of file glc_state.cpp.
References m_Vendor.
| QString GLC_State::version | ( | ) | [static] |
GLC_CacheManager GLC_State::m_CacheManager [static, private] |
The current cache manager.
Definition at line 197 of file glc_state.h.
Referenced by currentCacheManager(), and setCurrentCacheManager().
bool GLC_State::m_GlslSupported = false [static, private] |
GLSL supported flag.
Definition at line 167 of file glc_state.h.
Referenced by glslSupported(), setGlslSupport(), setGlslUsage(), and setSelectionShaderUsage().
bool GLC_State::m_IsFrustumCullingActivated = false [static, private] |
Frustum culling activated.
Definition at line 203 of file glc_state.h.
Referenced by isFrustumCullingActivated(), and setFrustumCullingUsage().
bool GLC_State::m_IsInSelectionMode = false [static, private] |
In selection mode.
Definition at line 179 of file glc_state.h.
Referenced by isInSelectionMode(), and setSelectionMode().
bool GLC_State::m_IsPixelCullingActivated = true [static, private] |
Pixel culling activation.
Definition at line 182 of file glc_state.h.
Referenced by isPixelCullingActivated(), and setPixelCullingUsage().
bool GLC_State::m_IsSpacePartitionningActivated = false [static, private] |
Space partitionning activation.
Definition at line 200 of file glc_state.h.
Referenced by isSpacePartitionningActivated(), and setSpacePartionningUsage().
bool GLC_State::m_PointSpriteSupported = false [static, private] |
Point Sprite supported flag.
Definition at line 170 of file glc_state.h.
Referenced by pointSpriteSupported(), and setPointSpriteSupport().
QString GLC_State::m_Renderer [static, private] |
The Opengl card renderer.
Definition at line 191 of file glc_state.h.
Referenced by init(), and renderer().
bool GLC_State::m_UseCache = false [static, private] |
Cache usage.
Definition at line 194 of file glc_state.h.
Referenced by cacheIsUsed(), and setCacheUsage().
bool GLC_State::m_UseSelectionShader = false [static, private] |
Use selectionShader flag.
Definition at line 176 of file glc_state.h.
Referenced by selectionShaderUsed(), and setSelectionShaderUsage().
bool GLC_State::m_UseShader = true [static, private] |
Use shader.
Definition at line 173 of file glc_state.h.
Referenced by glslUsed(), and setGlslUsage().
bool GLC_State::m_UseVbo = true [static, private] |
bool GLC_State::m_VboSupported = false [static, private] |
VBO supported flag.
Definition at line 161 of file glc_state.h.
Referenced by setVboSupport(), setVboUsage(), and vboSupported().
QString GLC_State::m_Vendor [static, private] |
The Opengl card vendor.
Definition at line 188 of file glc_state.h.
Referenced by init(), vendor(), and vendorIsNvidia().
QString GLC_State::m_Version [static, private] |
The Opengl card version.
Definition at line 185 of file glc_state.h.