Updated VC project to contain Detour merge.

Some debug draw code was still passing number of primitives to draw to the DD, removed those.
This commit is contained in:
Mikko Mononen 2009-12-21 08:14:01 +00:00
parent 41061699d6
commit 021880fe92
3 changed files with 51 additions and 63 deletions

View File

@ -31,7 +31,7 @@ void duDebugDrawTriMesh(duDebugDraw* dd, const float* verts, int nverts,
const int* tris, const float* normals, int ntris, const int* tris, const float* normals, int ntris,
const unsigned char* flags) const unsigned char* flags)
{ {
dd->begin(DU_DRAW_TRIS, ntris); dd->begin(DU_DRAW_TRIS);
for (int i = 0; i < ntris*3; i += 3) for (int i = 0; i < ntris*3; i += 3)
{ {
unsigned int color; unsigned int color;
@ -54,7 +54,7 @@ void duDebugDrawTriMeshSlope(duDebugDraw* dd, const float* verts, int nverts,
{ {
const float walkableThr = cosf(walkableSlopeAngle/180.0f*(float)M_PI); const float walkableThr = cosf(walkableSlopeAngle/180.0f*(float)M_PI);
dd->begin(DU_DRAW_TRIS, ntris); dd->begin(DU_DRAW_TRIS);
for (int i = 0; i < ntris*3; i += 3) for (int i = 0; i < ntris*3; i += 3)
{ {
const float* norm = &normals[i]; const float* norm = &normals[i];
@ -305,7 +305,7 @@ void duDebugDrawCompactHeightfieldSolid(duDebugDraw* dd, const rcCompactHeightfi
unsigned int color = duRGBA(0,192,255,64); unsigned int color = duRGBA(0,192,255,64);
dd->begin(DU_DRAW_QUADS, chf.spanCount*4); dd->begin(DU_DRAW_QUADS);
for (int y = 0; y < chf.height; ++y) for (int y = 0; y < chf.height; ++y)
{ {
@ -334,7 +334,7 @@ void duDebugDrawCompactHeightfieldRegions(duDebugDraw* dd, const rcCompactHeight
const float cs = chf.cs; const float cs = chf.cs;
const float ch = chf.ch; const float ch = chf.ch;
dd->begin(DU_DRAW_QUADS, chf.spanCount*4); dd->begin(DU_DRAW_QUADS);
for (int y = 0; y < chf.height; ++y) for (int y = 0; y < chf.height; ++y)
{ {
@ -375,7 +375,7 @@ void duDebugDrawCompactHeightfieldDistance(duDebugDraw* dd, const rcCompactHeigh
if (maxd < 1.0f) maxd = 1; if (maxd < 1.0f) maxd = 1;
const float dscale = 255.0f / maxd; const float dscale = 255.0f / maxd;
dd->begin(DU_DRAW_QUADS, chf.spanCount*4); dd->begin(DU_DRAW_QUADS);
for (int y = 0; y < chf.height; ++y) for (int y = 0; y < chf.height; ++y)
{ {

Binary file not shown.

View File

@ -41,7 +41,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\Contrib\SDL\include;..\..\Include;..\..\..\Detour\Include;..\..\..\Recast\Include;..\..\Contrib;$(NOINHERIT)" AdditionalIncludeDirectories="..\..\Contrib\SDL\include;..\..\Include;..\..\..\Detour\Include;..\..\..\DebugUtils\Include;..\..\..\Recast\Include;..\..\Contrib;$(NOINHERIT)"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
@ -117,7 +117,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\Contrib\SDL\include;..\..\Include;..\..\..\Detour\Include;..\..\..\Recast\Include;..\..\Contrib" AdditionalIncludeDirectories="..\..\..\DebugUtils\Include;..\..\Contrib\SDL\include;..\..\Include;..\..\..\Detour\Include;..\..\..\Recast\Include;..\..\Contrib"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
@ -187,10 +187,6 @@
RelativePath="..\..\..\Recast\Include\Recast.h" RelativePath="..\..\..\Recast\Include\Recast.h"
> >
</File> </File>
<File
RelativePath="..\..\..\Recast\Include\RecastDebugDraw.h"
>
</File>
<File <File
RelativePath="..\..\..\Recast\Include\RecastLog.h" RelativePath="..\..\..\Recast\Include\RecastLog.h"
> >
@ -211,10 +207,6 @@
RelativePath="..\..\..\Recast\Source\RecastContour.cpp" RelativePath="..\..\..\Recast\Source\RecastContour.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\Recast\Source\RecastDebugDraw.cpp"
>
</File>
<File <File
RelativePath="..\..\..\Recast\Source\RecastFilter.cpp" RelativePath="..\..\..\Recast\Source\RecastFilter.cpp"
> >
@ -255,10 +247,6 @@
RelativePath="..\..\..\Detour\Include\DetourCommon.h" RelativePath="..\..\..\Detour\Include\DetourCommon.h"
> >
</File> </File>
<File
RelativePath="..\..\..\Detour\Include\DetourDebugDraw.h"
>
</File>
<File <File
RelativePath="..\..\..\Detour\Include\DetourNavMesh.h" RelativePath="..\..\..\Detour\Include\DetourNavMesh.h"
> >
@ -271,22 +259,6 @@
RelativePath="..\..\..\Detour\Include\DetourNode.h" RelativePath="..\..\..\Detour\Include\DetourNode.h"
> >
</File> </File>
<File
RelativePath="..\..\..\Detour\Include\DetourStatNavMesh.h"
>
</File>
<File
RelativePath="..\..\..\Detour\Include\DetourStatNavMeshBuilder.h"
>
</File>
<File
RelativePath="..\..\..\Detour\Include\DetourTileNavMesh.h"
>
</File>
<File
RelativePath="..\..\..\Detour\Include\DetourTileNavMeshBuilder.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Source" Name="Source"
@ -295,10 +267,6 @@
RelativePath="..\..\..\Detour\Source\DetourCommon.cpp" RelativePath="..\..\..\Detour\Source\DetourCommon.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\Detour\Source\DetourDebugDraw.cpp"
>
</File>
<File <File
RelativePath="..\..\..\Detour\Source\DetourNavMesh.cpp" RelativePath="..\..\..\Detour\Source\DetourNavMesh.cpp"
> >
@ -311,22 +279,6 @@
RelativePath="..\..\..\Detour\Source\DetourNode.cpp" RelativePath="..\..\..\Detour\Source\DetourNode.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\Detour\Source\DetourStatNavMesh.cpp"
>
</File>
<File
RelativePath="..\..\..\Detour\Source\DetourStatNavMeshBuilder.cpp"
>
</File>
<File
RelativePath="..\..\..\Detour\Source\DetourTileNavMesh.cpp"
>
</File>
<File
RelativePath="..\..\..\Detour\Source\DetourTileNavMeshBuilder.cpp"
>
</File>
</Filter> </Filter>
</Filter> </Filter>
<Filter <Filter
@ -355,10 +307,6 @@
RelativePath="..\..\Include\Sample.h" RelativePath="..\..\Include\Sample.h"
> >
</File> </File>
<File
RelativePath="..\..\Include\Sample_DynMesh.h"
>
</File>
<File <File
RelativePath="..\..\Include\Sample_SoloMesh.h" RelativePath="..\..\Include\Sample_SoloMesh.h"
> >
@ -407,10 +355,6 @@
RelativePath="..\..\Source\Sample.cpp" RelativePath="..\..\Source\Sample.cpp"
> >
</File> </File>
<File
RelativePath="..\..\Source\Sample_DynMesh.cpp"
>
</File>
<File <File
RelativePath="..\..\Source\Sample_SoloMesh.cpp" RelativePath="..\..\Source\Sample_SoloMesh.cpp"
> >
@ -429,6 +373,50 @@
</File> </File>
</Filter> </Filter>
</Filter> </Filter>
<Filter
Name="DebugUtils"
>
<Filter
Name="Include"
>
<File
RelativePath="..\..\..\DebugUtils\Include\DebugDraw.h"
>
</File>
<File
RelativePath="..\..\..\DebugUtils\Include\DetourDebugDraw.h"
>
</File>
<File
RelativePath="..\..\..\DebugUtils\Include\RecastDebugDraw.h"
>
</File>
<File
RelativePath="..\..\..\DebugUtils\Include\RecastDump.h"
>
</File>
</Filter>
<Filter
Name="Source"
>
<File
RelativePath="..\..\..\DebugUtils\Source\DebugDraw.cpp"
>
</File>
<File
RelativePath="..\..\..\DebugUtils\Source\DetourDebugDraw.cpp"
>
</File>
<File
RelativePath="..\..\..\DebugUtils\Source\RecastDebugDraw.cpp"
>
</File>
<File
RelativePath="..\..\..\DebugUtils\Source\RecastDump.cpp"
>
</File>
</Filter>
</Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>