swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

static void rasterizeTri - publicly accessible #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Can you make:

static void rasterizeTri

publicly accessible? I am calling rcRasterizeTriangle (singular) which has the 
overhead of updating the rcBuildTimes struct. I'd rather manage the build times 
myself in the higher function that's processing each triangle. I can't use the 
rcRasterizeTriangles (plural) function because my triangles are not in the 
required format.

Thanks,
Neil

Original issue reported on code.google.com by armstron...@gmail.com on 10 Jun 2010 at 10:29

GoogleCodeExporter commented 9 years ago

Original comment by memono...@gmail.com on 8 Jul 2010 at 11:21

GoogleCodeExporter commented 9 years ago
You can now call rcRasterizeTriangle() with dummy context which removes the 
timing overhead:

rcBuildContext dummy;
rcRasterizeTriangle(&dummy, ...);

Original comment by memono...@gmail.com on 19 Aug 2010 at 9:28

GoogleCodeExporter commented 9 years ago
... and it is fixed in R197.

Original comment by memono...@gmail.com on 19 Aug 2010 at 9:28

GoogleCodeExporter commented 9 years ago
I'm concerned that this solution has the overhead of 4 virtual function calls 
(none of which result in any useful processing because I'm not interested in 
the build times in production builds) and two divides (which I could cache). 
Considering this is one of the functions that gets hammered the most when 
generating a navmesh it'd be good to have it be as fast as possible.

If you make "rasterizeTri" publicly accessible then I'll have non of these 
overhead issues.

Original comment by armstron...@gmail.com on 23 Aug 2010 at 4:47

GoogleCodeExporter commented 9 years ago
The recast context in SVN R206 includes not a flag to turn off logging and 
timing. The flag is tested before virtual funcs are called. This should fix any 
performance concerns.

Original comment by memono...@gmail.com on 24 Aug 2010 at 5:54