mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Set the osg::Material on the terrain root node
This commit is contained in:
parent
6000e48bba
commit
ca0e1fe0e0
@ -154,10 +154,6 @@ namespace Terrain
|
||||
, mBlendmapScale(blendmapScale)
|
||||
, mLayerTileSize(layerTileSize)
|
||||
{
|
||||
osg::ref_ptr<osg::Material> material (new osg::Material);
|
||||
material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);
|
||||
getOrCreateStateSet()->setAttributeAndModes(material, osg::StateAttribute::ON);
|
||||
|
||||
selectTechnique(0);
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include <osg/UserDataContainer>
|
||||
#include <osg/Material>
|
||||
|
||||
#include <OpenThreads/ScopedLock>
|
||||
|
||||
@ -56,6 +57,9 @@ TerrainGrid::TerrainGrid(osg::Group* parent, Resource::ResourceSystem* resourceS
|
||||
, mCache((storage->getCellVertices()-1)/static_cast<float>(mNumSplits) + 1)
|
||||
, mUnrefQueue(unrefQueue)
|
||||
{
|
||||
osg::ref_ptr<osg::Material> material (new osg::Material);
|
||||
material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);
|
||||
mTerrainRoot->getOrCreateStateSet()->setAttributeAndModes(material, osg::StateAttribute::ON);
|
||||
}
|
||||
|
||||
TerrainGrid::~TerrainGrid()
|
||||
|
Loading…
x
Reference in New Issue
Block a user