Make RecastDemo colors more meaningful (#254)

Implement a SampleDebugDraw which will color area types meaningfully, for example
color water as blue, grass as green and so on.
This commit is contained in:
Domenico Albani
2017-02-02 20:27:43 +01:00
committed by Jakob Botsch Nielsen
parent 16a7a30ada
commit 03eb2f92f3
13 changed files with 121 additions and 96 deletions

View File

@@ -445,7 +445,7 @@ void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef re
dd->depthMask(false);
const unsigned int c = (col & 0x00ffffff) | (64 << 24);
const unsigned int c = duTransCol(col, 64);
const unsigned int ip = (unsigned int)(poly - tile->polys);
if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION)
@@ -456,7 +456,7 @@ void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef re
// Connection arc.
duAppendArc(dd, con->pos[0],con->pos[1],con->pos[2], con->pos[3],con->pos[4],con->pos[5], 0.25f,
(con->flags & 1) ? 0.6f : 0, 0.6f, c);
(con->flags & 1) ? 0.6f : 0.0f, 0.6f, c);
dd->end();
}