Recast: improve navmesh rendering

Make boundaries and vertices a bit more thin and make vertices more dark.
This commit is contained in:
Kawe Mazidjatari 2024-07-14 20:43:57 +02:00
parent fe38aaaae6
commit 3f2de9ac6d
3 changed files with 13 additions and 13 deletions

View File

@ -40,7 +40,7 @@ unsigned int EditorDebugDraw::areaToCol(unsigned int area)
switch(area)
{
// Ground (0) : light blue
case EDITOR_POLYAREA_GROUND: return duRGBA(0, 195, 255, 255);
case EDITOR_POLYAREA_GROUND: return duRGBA(0, 192, 215, 255);
// Water : blue
case EDITOR_POLYAREA_WATER: return duRGBA(0, 0, 255, 255);
// Road : brown

View File

@ -182,11 +182,11 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMesh
// Draw inner poly boundaries
if (flags & DU_DRAWNAVMESH_INNERBOUND)
drawPolyBoundaries(dd, tile, 2.5f, offset, true);
drawPolyBoundaries(dd, tile, 1.5f, offset, true);
// Draw outer poly boundaries
if (flags & DU_DRAWNAVMESH_OUTERBOUND)
drawPolyBoundaries(dd, tile, 4.5f, offset, false);
drawPolyBoundaries(dd, tile, 3.5f, offset, false);
// Draw poly centers
if (flags & DU_DRAWNAVMESH_POLYCENTERS)
@ -252,8 +252,8 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMesh
if (flags & DU_DRAWNAVMESH_VERTS)
{
const unsigned int vcol = duRGBA(0,0,0,196);
dd->begin(DU_DRAW_POINTS, 5.0f, offset);
const unsigned int vcol = duRGBA(0,0,0,220);
dd->begin(DU_DRAW_POINTS, 4.0f, offset);
for (int i = 0; i < tile->header->vertCount; ++i)
{
const float* v = &tile->verts[i*3];
@ -838,7 +838,7 @@ void duDebugDrawTileCachePolyMesh(duDebugDraw* dd, const struct dtTileCachePolyM
// Draw boundary edges
const unsigned int colb = duRGBA(0,48,64,220);
dd->begin(DU_DRAW_LINES, 4.5f, offset);
dd->begin(DU_DRAW_LINES, 3.5f, offset);
for (int i = 0; i < lmesh.npolys; ++i)
{
const unsigned short* p = &lmesh.polys[i*nvp*2];
@ -890,7 +890,7 @@ void duDebugDrawTileCachePolyMesh(duDebugDraw* dd, const struct dtTileCachePolyM
}
dd->end();
dd->begin(DU_DRAW_POINTS, 5.0f, offset);
dd->begin(DU_DRAW_POINTS, 4.0f, offset);
const unsigned int colv = duRGBA(0,0,0,220);
for (int i = 0; i < lmesh.nverts; ++i)
{

View File

@ -583,7 +583,7 @@ void duDebugDrawContours(duDebugDraw* dd, const rcContourSet& cset, const float*
const unsigned char a = (unsigned char)(alpha*255.0f);
dd->begin(DU_DRAW_LINES, 4.5f, offset);
dd->begin(DU_DRAW_LINES, 3.5f, offset);
for (int i = 0; i < cset.nconts; ++i)
{
@ -610,7 +610,7 @@ void duDebugDrawContours(duDebugDraw* dd, const rcContourSet& cset, const float*
}
dd->end();
dd->begin(DU_DRAW_POINTS, 5.0f, offset);
dd->begin(DU_DRAW_POINTS, 4.0f, offset);
for (int i = 0; i < cset.nconts; ++i)
{
@ -706,7 +706,7 @@ void duDebugDrawPolyMesh(duDebugDraw* dd, const struct rcPolyMesh& mesh, const f
// Draw boundary edges
const unsigned int colb = duRGBA(0,48,64,220);
dd->begin(DU_DRAW_LINES, 4.5f, offset);
dd->begin(DU_DRAW_LINES, 3.5f, offset);
for (int i = 0; i < mesh.npolys; ++i)
{
const unsigned short* p = &mesh.polys[i*nvp*2];
@ -732,7 +732,7 @@ void duDebugDrawPolyMesh(duDebugDraw* dd, const struct rcPolyMesh& mesh, const f
}
dd->end();
dd->begin(DU_DRAW_POINTS, 5.0f, offset);
dd->begin(DU_DRAW_POINTS, 4.0f, offset);
const unsigned int colv = duRGBA(0,0,0,220);
for (int i = 0; i < mesh.nverts; ++i)
{
@ -804,7 +804,7 @@ void duDebugDrawPolyMeshDetail(duDebugDraw* dd, const struct rcPolyMeshDetail& d
dd->end();
// External edges.
dd->begin(DU_DRAW_LINES, 4.5f, offset);
dd->begin(DU_DRAW_LINES, 3.5f, offset);
const unsigned int cole = duRGBA(0,0,0,64);
for (int i = 0; i < dmesh.nmeshes; ++i)
{
@ -832,7 +832,7 @@ void duDebugDrawPolyMeshDetail(duDebugDraw* dd, const struct rcPolyMeshDetail& d
}
dd->end();
dd->begin(DU_DRAW_POINTS, 5.0f, offset);
dd->begin(DU_DRAW_POINTS, 4.0f, offset);
const unsigned int colv = duRGBA(0,0,0,64);
for (int i = 0; i < dmesh.nmeshes; ++i)
{