Added GeometryPool::s/getUseGeometryShader() hint, and OSG_TERRAIN_USE_GEOMETRY_SHADER env var for setting the default value.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14660 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
249c0ff208
commit
3eca5765c9
@ -110,6 +110,9 @@ class OSGTERRAIN_EXPORT GeometryPool : public osg::Referenced
|
|||||||
|
|
||||||
void applyLayers(osgTerrain::TerrainTile* tile, osg::StateSet* stateset);
|
void applyLayers(osgTerrain::TerrainTile* tile, osg::StateSet* stateset);
|
||||||
|
|
||||||
|
void setUseGeometryShader(bool flag) { _useGeometryShader = flag; }
|
||||||
|
bool getUseGeometryShader() const { return _useGeometryShader; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~GeometryPool();
|
virtual ~GeometryPool();
|
||||||
|
|
||||||
|
@ -44,6 +44,19 @@ const osgTerrain::Locator* osgTerrain::computeMasterLocator(const osgTerrain::Te
|
|||||||
GeometryPool::GeometryPool():
|
GeometryPool::GeometryPool():
|
||||||
_useGeometryShader(false)
|
_useGeometryShader(false)
|
||||||
{
|
{
|
||||||
|
const char* ptr = 0;
|
||||||
|
if ((ptr = getenv("OSG_TERRAIN_USE_GEOMETRY_SHADER")) != 0)
|
||||||
|
{
|
||||||
|
if (strcmp(ptr,"OFF")==0 || strcmp(ptr,"Off")==0 || strcmp(ptr,"off")==0 ||
|
||||||
|
strcmp(ptr,"FALSE")==0 || strcmp(ptr,"False")==0 || strcmp(ptr,"false")==0)
|
||||||
|
{
|
||||||
|
_useGeometryShader = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_useGeometryShader = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GeometryPool::~GeometryPool()
|
GeometryPool::~GeometryPool()
|
||||||
|
Loading…
Reference in New Issue
Block a user