mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Set the osg::Material on the terrain root node
This commit is contained in:
parent
6000e48bba
commit
ca0e1fe0e0
2 changed files with 4 additions and 4 deletions
|
@ -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…
Reference in a new issue