1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 19:53:53 +00:00

Use different colors for walkable and non-walkable triangles

This commit is contained in:
elsid 2021-10-09 17:44:25 +02:00
parent b61140b8ba
commit daff7aba01
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -64,8 +64,8 @@ namespace SceneUtil
const auto normals = calculateNormals(vertices, indices); const auto normals = calculateNormals(vertices, indices);
const auto texScale = 1.0f / (settings.mCellSize * 10.0f); const auto texScale = 1.0f / (settings.mCellSize * 10.0f);
duDebugDrawTriMesh(&debugDraw, vertices.data(), static_cast<int>(vertices.size() / 3), duDebugDrawTriMeshSlope(&debugDraw, vertices.data(), static_cast<int>(vertices.size() / 3),
indices.data(), normals.data(), static_cast<int>(indices.size() / 3), nullptr, texScale); indices.data(), normals.data(), static_cast<int>(indices.size() / 3), settings.mMaxSlope, texScale);
osg::ref_ptr<osg::Material> material = new osg::Material; osg::ref_ptr<osg::Material> material = new osg::Material;
material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE); material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);