From 0e810c8d3224d538b1a6d8cb81aac122e32d8eb7 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Thu, 18 Jun 2020 09:12:56 +0400 Subject: [PATCH] Fix cell borders color --- components/terrain/cellborder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/terrain/cellborder.cpp b/components/terrain/cellborder.cpp index 6eabadf92..47c567f54 100644 --- a/components/terrain/cellborder.cpp +++ b/components/terrain/cellborder.cpp @@ -1,5 +1,6 @@ #include "cellborder.hpp" +#include #include #include #include @@ -64,6 +65,9 @@ void CellBorder::createCellBorderGeometry(int x, int y) borderGeode->addDrawable(border.get()); osg::StateSet *stateSet = borderGeode->getOrCreateStateSet(); + osg::ref_ptr 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);