Draw ground convex points red as well

This commit is contained in:
Kawe Mazidjatari 2022-07-27 14:56:11 +02:00
parent 369c92e358
commit 677d993403

View File

@ -626,7 +626,7 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/)
unsigned int col;
if (vol->area == SAMPLE_POLYAREA_GROUND)
col = duRGBA(255, 0, 0, 220); // Use red for visibility (ground acts as deletion).
col = duRGBA(255, 0, 0, 220);
else
col = duTransCol(dd->areaToCol(vol->area), 220);
@ -648,7 +648,13 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/)
for (int i = 0; i < m_volumeCount; ++i)
{
const ConvexVolume* vol = &m_volumes[i];
unsigned int col = duDarkenCol(duTransCol(dd->areaToCol(vol->area), 220));
unsigned int col;
if (vol->area == SAMPLE_POLYAREA_GROUND)
col = duRGBA(255, 0, 0, 220);
else
col = duDarkenCol(duTransCol(dd->areaToCol(vol->area), 220));
for (int j = 0; j < vol->nverts; ++j)
{
dd->vertex(vol->verts[j*3+0],vol->verts[j*3+1]+0.1f,vol->verts[j*3+2], col);
@ -657,7 +663,6 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/)
}
}
dd->end();
dd->depthMask(true);
}