mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Move updateTextureFiltering and material into the base class
This commit is contained in:
parent
5eff286c71
commit
c487df0abb
4 changed files with 14 additions and 15 deletions
|
@ -1,6 +1,8 @@
|
|||
#include "world.hpp"
|
||||
|
||||
#include <osg/Group>
|
||||
#include <osg/Material>
|
||||
|
||||
#include <osgUtil/IncrementalCompileOperation>
|
||||
|
||||
#include <components/resource/resourcesystem.hpp>
|
||||
|
@ -23,6 +25,10 @@ World::World(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSyst
|
|||
mTerrainRoot = new osg::Group;
|
||||
mTerrainRoot->setNodeMask(nodeMask);
|
||||
mTerrainRoot->getOrCreateStateSet()->setRenderingHint(osg::StateSet::OPAQUE_BIN);
|
||||
osg::ref_ptr<osg::Material> material (new osg::Material);
|
||||
material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);
|
||||
mTerrainRoot->getOrCreateStateSet()->setAttributeAndModes(material, osg::StateAttribute::ON);
|
||||
|
||||
mTerrainRoot->setName("Terrain Root");
|
||||
|
||||
osg::ref_ptr<CompositeMapRenderer> renderer (new CompositeMapRenderer);
|
||||
|
@ -55,4 +61,9 @@ float World::getHeightAt(const osg::Vec3f &worldPos)
|
|||
return mStorage->getHeightAt(worldPos);
|
||||
}
|
||||
|
||||
void World::updateTextureFiltering()
|
||||
{
|
||||
mTextureManager->updateTextureFiltering();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue