mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:23:54 +00:00
Fix cell borders color
This commit is contained in:
parent
c944acf26b
commit
0e810c8d32
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
#include "cellborder.hpp"
|
#include "cellborder.hpp"
|
||||||
|
|
||||||
|
#include <osg/Material>
|
||||||
#include <osg/PolygonMode>
|
#include <osg/PolygonMode>
|
||||||
#include <osg/Geometry>
|
#include <osg/Geometry>
|
||||||
#include <osg/Geode>
|
#include <osg/Geode>
|
||||||
|
@ -64,6 +65,9 @@ void CellBorder::createCellBorderGeometry(int x, int y)
|
||||||
borderGeode->addDrawable(border.get());
|
borderGeode->addDrawable(border.get());
|
||||||
|
|
||||||
osg::StateSet *stateSet = borderGeode->getOrCreateStateSet();
|
osg::StateSet *stateSet = borderGeode->getOrCreateStateSet();
|
||||||
|
osg::ref_ptr<osg::Material> material (new osg::Material);
|
||||||
|
material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);
|
||||||
|
stateSet->setAttribute(material);
|
||||||
|
|
||||||
osg::PolygonMode* polygonmode = new osg::PolygonMode;
|
osg::PolygonMode* polygonmode = new osg::PolygonMode;
|
||||||
polygonmode->setMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE);
|
polygonmode->setMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE);
|
||||||
|
|
Loading…
Reference in a new issue