H0THEAD
28-07-2011 09:10:36
I am finded a bug in hydrax`s source files SimpleGrid.cpp, RadialGrid.cpp, ProjectedGrid.cpp.
My application falling down when i trying remove water surface and recreate it with another params. Fail detected in
SimpleGrid.cpp Lines 217-225 (old version)
so, i am modifed that and problem was solved
In other modules same code was added.
My application falling down when i trying remove water surface and recreate it with another params. Fail detected in
SimpleGrid.cpp Lines 217-225 (old version)
Module::remove();
if (mVertices)
{
if (getNormalMode() == MaterialManager::NM_VERTEX)
{
delete [] static_cast<Mesh::POS_NORM_VERTEX*>(mVertices);
}
else if (getNormalMode() == MaterialManager::NM_RTT)
{
delete [] static_cast<Mesh::POS_VERTEX*>(mVertices);
}
}
if (mVerticesChoppyBuffer)
{
delete [] mVerticesChoppyBuffer;
}
so, i am modifed that and problem was solved
if (mVertices)
{
if (getNormalMode() == MaterialManager::NM_VERTEX)
{
delete [] static_cast<Mesh::POS_NORM_VERTEX*>(mVertices);
mVertices = 0;
}
else if (getNormalMode() == MaterialManager::NM_RTT)
{
delete [] static_cast<Mesh::POS_VERTEX*>(mVertices);
mVertices = 0;
}
}
if (mVerticesChoppyBuffer)
{
delete [] mVerticesChoppyBuffer;
mVerticesChoppyBuffer = 0;
}
In other modules same code was added.