Hi, i think i found an error by this "nice" 2500 lines
long function. If i use your code from Helloworld, to
export a little bigger object to convert it to u3d
format, then it goes to heap error. And i know why.
I want to generate an object, which have 48 vertices,
264 normal index from the normal array, with 88 faces.
Then the function try to create the LOD objects from 0-
48 (minresolution to maxresolution) and it makes that
in a while cycle through the actual resolution.
Then somewhere want to create a new object from that.
But the problem is that the normalindex count goes
from 264 to more like 1000!!!. Then the function
writes back this new object to the
m_pReconstructedAuthorCLODMesh (memcpy). But while the
normals is more like the original, it writes over the
original object!!! Then of course it occures memory
If i change in the helloworld file:
// Set mesh compiler parameters and compile mesh
(create progressive updates)
// Set minimal resolution to make all
mesh progressive (no base mesh)
aparams.CompressParams.uMinimumResolution = 48;
// Set default quality
// Set compiler flag to use
aparams.bCompressSettings = TRUE;
// Progress function could be set to
be called during CLOD creation process
aparams.pProgressCallback = NULL;
result = pCompiler->Compile
You see the uMinimumResolution = 48 is the number of
vertices, then everything is ok. So if i don't want
CLOD, then runs correctly.
Log in to post a comment.