Commit 28267596 authored by hybrid's avatar hybrid

Another try to fix the compilation issues. Still untested, as my MSVC is...

Another try to fix the compilation issues. Still untested, as my MSVC is currently out of business...

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4527 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 7305f100
...@@ -1084,11 +1084,10 @@ void CMeshManipulator::heightmapOptimizeMesh(IMeshBuffer * const mb, const f32 t ...@@ -1084,11 +1084,10 @@ void CMeshManipulator::heightmapOptimizeMesh(IMeshBuffer * const mb, const f32 t
// First an acceleration structure: given this vert, which triangles touch it? // First an acceleration structure: given this vert, which triangles touch it?
// Using this drops two exponents off the algorightm complexity, O(n^4) > O(n^2) // Using this drops two exponents off the algorightm complexity, O(n^4) > O(n^2)
// Other optimizations brought it down to O(n). // Other optimizations brought it down to O(n).
u32 **accel = (u32 **) malloc(verts, sizeof(u32 *)); u32 **accel = (u32 **) malloc(verts * sizeof(u32 *));
for (u32 i = 0; i < verts; i++) for (u32 i = 0; i < verts; i++)
{ {
accel[i] = (u32 *) calloc(HEIGHT_TRIACCEL_MAX, sizeof(u32)); accel[i] = (u32 *) calloc(HEIGHT_TRIACCEL_MAX, sizeof(u32));
for (u32 j = 0; j < HEIGHT_TRIACCEL_MAX; j++) for (u32 j = 0; j < HEIGHT_TRIACCEL_MAX; j++)
{ {
accel[i][j] = USHRT_MAX; accel[i][j] = USHRT_MAX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment