mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: invert render toggle flags
This commit is contained in:
parent
33b6d9e351
commit
601d958e14
@ -55,7 +55,7 @@ Editor::Editor() :
|
|||||||
m_navMesh(0),
|
m_navMesh(0),
|
||||||
m_navQuery(0),
|
m_navQuery(0),
|
||||||
m_crowd(0),
|
m_crowd(0),
|
||||||
m_navMeshDrawFlags(DU_DRAWNAVMESH_OFFMESHCONS|DU_DRAWNAVMESH_CLOSEDLIST),
|
m_navMeshDrawFlags(DU_DRAWNAVMESH_OFFMESHCONS|DU_DRAWNAVMESH_CLOSEDLIST|DU_DRAWNAVMESH_VERTS|DU_DRAWNAVMESH_INNERBOUND|DU_DRAWNAVMESH_OUTERBOUND),
|
||||||
m_filterLowHangingObstacles(true),
|
m_filterLowHangingObstacles(true),
|
||||||
m_filterLedgeSpans(true),
|
m_filterLedgeSpans(true),
|
||||||
m_filterWalkableLowHeightSpans(true),
|
m_filterWalkableLowHeightSpans(true),
|
||||||
|
@ -377,14 +377,14 @@ void Editor_TileMesh::handleDebugMode()
|
|||||||
|
|
||||||
imguiLabel("Render Options");
|
imguiLabel("Render Options");
|
||||||
|
|
||||||
if (imguiCheck("Draw Vertex Points", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_NO_VERTS) == 0))
|
if (imguiCheck("Draw Vertex Points", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_VERTS)))
|
||||||
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_NO_VERTS);
|
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_VERTS);
|
||||||
|
|
||||||
if (imguiCheck("Draw Inner Poly Boundaries", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_NO_INNERBOUND) == 0))
|
if (imguiCheck("Draw Inner Poly Boundaries", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_INNERBOUND)))
|
||||||
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_NO_INNERBOUND);
|
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_INNERBOUND);
|
||||||
|
|
||||||
if (imguiCheck("Draw Outer Poly Boundaries", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_NO_OUTERBOUND) == 0))
|
if (imguiCheck("Draw Outer Poly Boundaries", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_OUTERBOUND)))
|
||||||
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_NO_OUTERBOUND);
|
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_OUTERBOUND);
|
||||||
|
|
||||||
if (imguiCheck("Disable NavMesh Transparency", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_NO_ALPHA)))
|
if (imguiCheck("Disable NavMesh Transparency", (getNavMeshDrawFlags() & DU_DRAWNAVMESH_NO_ALPHA)))
|
||||||
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_NO_ALPHA);
|
toggleNavMeshDrawFlag(DU_DRAWNAVMESH_NO_ALPHA);
|
||||||
|
@ -28,9 +28,9 @@ enum DrawNavMeshFlags
|
|||||||
DU_DRAWNAVMESH_OFFMESHCONS = 1 << 0,
|
DU_DRAWNAVMESH_OFFMESHCONS = 1 << 0,
|
||||||
DU_DRAWNAVMESH_CLOSEDLIST = 1 << 1,
|
DU_DRAWNAVMESH_CLOSEDLIST = 1 << 1,
|
||||||
DU_DRAWNAVMESH_COLOR_TILES = 1 << 2,
|
DU_DRAWNAVMESH_COLOR_TILES = 1 << 2,
|
||||||
DU_DRAWNAVMESH_NO_VERTS = 1 << 3, // Do not render vertex points
|
DU_DRAWNAVMESH_VERTS = 1 << 3, // Render vertex points
|
||||||
DU_DRAWNAVMESH_NO_INNERBOUND = 1 << 4, // Do not render inner poly boundaries
|
DU_DRAWNAVMESH_INNERBOUND = 1 << 4, // Render inner poly boundaries
|
||||||
DU_DRAWNAVMESH_NO_OUTERBOUND = 1 << 5, // Do not render outer poly boundaries
|
DU_DRAWNAVMESH_OUTERBOUND = 1 << 5, // Render outer poly boundaries
|
||||||
DU_DRAWNAVMESH_NO_ALPHA = 1 << 6, // Render meshes as opaque.
|
DU_DRAWNAVMESH_NO_ALPHA = 1 << 6, // Render meshes as opaque.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -182,11 +182,11 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMesh
|
|||||||
dd->end();
|
dd->end();
|
||||||
|
|
||||||
// Draw inner poly boundaries
|
// Draw inner poly boundaries
|
||||||
if (!(flags & DU_DRAWNAVMESH_NO_INNERBOUND))
|
if (flags & DU_DRAWNAVMESH_INNERBOUND)
|
||||||
drawPolyBoundaries(dd, tile, 1.5f, true);
|
drawPolyBoundaries(dd, tile, 1.5f, true);
|
||||||
|
|
||||||
// Draw outer poly boundaries
|
// Draw outer poly boundaries
|
||||||
if (!(flags & DU_DRAWNAVMESH_NO_OUTERBOUND))
|
if (flags & DU_DRAWNAVMESH_OUTERBOUND)
|
||||||
drawPolyBoundaries(dd, tile, 2.5f, false);
|
drawPolyBoundaries(dd, tile, 2.5f, false);
|
||||||
|
|
||||||
// Draw poly centers
|
// Draw poly centers
|
||||||
@ -250,7 +250,7 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMesh
|
|||||||
dd->end();
|
dd->end();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & DU_DRAWNAVMESH_NO_VERTS) == 0)
|
if (flags & DU_DRAWNAVMESH_VERTS)
|
||||||
{
|
{
|
||||||
const unsigned int vcol = duRGBA(0,0,0,196);
|
const unsigned int vcol = duRGBA(0,0,0,196);
|
||||||
dd->begin(DU_DRAW_POINTS, 3.0f);
|
dd->begin(DU_DRAW_POINTS, 3.0f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user