Hybrid;
Thanks for the response, but i am not quite sure what you mean by "lock it".
Do you mean that once the bmp data is loaded, the internal data structure can be considered as a raw file?
My main concern here is how to transform this bmp data into raw since bullet seems to only like raw. The code below is a sample on what i am using to load heightmap info with bullet:
Code: Select all
...
FILE* heightfieldFile = fopen(filename,"r");
if (heightfieldFile)
{
int numBytes = fread(heightfieldData,1,width*length,heightfieldFile);
if (!numBytes)
{
printf("couldn't read heightfield at %s\n",filename);
}
fclose (heightfieldFile);
}
...
btHeightfieldTerrainShape* heightFieldShape = new btHeightfieldTerrainShape(width,length,heightfieldData,maxHeight,upIndex,useFloatDatam,flipQuadEdges);;
Any help is appreciated
Regards