1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

Merge pull request #2916 from akortunov/borders

Fix cell borders color
This commit is contained in:
Bret Curtis 2020-06-18 09:01:07 +02:00 committed by GitHub
commit cf3a20b595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
#include "cellborder.hpp"
#include <osg/Material>
#include <osg/PolygonMode>
#include <osg/Geometry>
#include <osg/Geode>
@ -64,6 +65,9 @@ void CellBorder::createCellBorderGeometry(int x, int y)
borderGeode->addDrawable(border.get());
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;
polygonmode->setMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE);