Demo: Changed demo "Builders" to "Samples".

Detour: Prefixed static nav with 'dtStat', this includes polys and poly refs too.
imgui: Made imgui code not to use id:s anymore, since there were way too many id clashes.
imgui: Separated the rendering code into its' own file, changed prebaked font to use stb_truetype instead, removed glfont.
imgui: Added 'disabled' property to widgets.
Recast: exposed single triangle rasterization into the recast api.
Demo: Changed the debug draw validation to be "soft", easier to demo now.
This commit is contained in:
Mikko Mononen
2009-07-13 10:30:37 +00:00
parent 20e07146b9
commit d71740036d
30 changed files with 7459 additions and 12722 deletions

View File

@@ -268,6 +268,21 @@ static void rasterizeTri(const float* v0, const float* v1, const float* v2,
}
}
void rcRasterizeTriangle(const float* v0, const float* v1, const float* v2,
unsigned char flags, rcHeightfield& solid)
{
rcTimeVal startTime = rcGetPerformanceTimer();
const float ics = 1.0f/solid.cs;
const float ich = 1.0f/solid.ch;
rasterizeTri(v0, v1, v2, flags, solid, solid.bmin, solid.bmax, solid.cs, ics, ich);
rcTimeVal endTime = rcGetPerformanceTimer();
if (rcGetBuildTimes())
rcGetBuildTimes()->rasterizeTriangles += rcGetDeltaTimeUsec(startTime, endTime);
}
void rcRasterizeTriangles(const float* verts, int nv,
const int* tris, const unsigned char* flags, int nt,
rcHeightfield& solid)
@@ -287,9 +302,6 @@ void rcRasterizeTriangles(const float* verts, int nv,
}
rcTimeVal endTime = rcGetPerformanceTimer();
// if (rcGetLog())
// rcGetLog()->log(RC_LOG_PROGRESS, "Rasterize: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
if (rcGetBuildTimes())
rcGetBuildTimes()->rasterizeTriangles += rcGetDeltaTimeUsec(startTime, endTime);