I create a cube:
Then in a function I create a memblock and extract the data:
dbMakeMeshFromObject(id, id);
dbMakeMemblockFromMesh(id, id);
DWORD FVFFormat = dbMemblockDword(id, 0);
DWORD FVFSize = dbMemblockDword(id, 4);
DWORD numberOfVertices = dbMemblockDword(id, 8);
int memblockSize = dbGetMemblockSize(id);
dbText(0, 60, "FVFFormat: ");
dbText(150, 60, dbStr((float)FVFFormat));
dbText(0, 75, "FVFSize: ");
dbText(150, 75, dbStr((float)FVFSize));
dbText(0, 90, "numberOfVertices: ");
dbText(150, 90, dbStr((float)numberOfVertices));
dbText(0, 105, "memblockSize: ");
dbText(150, 105, dbStr(memblockSize));
The output says...
FVFFormat: 274
FVFSize: 32
numberofVertices: 36
memblockSize: 1164
Surly a cube has 8 vertices? What am I doing wrong?
While I'm here, searching the forums on this issue there is talk of commands to directly extract the vertex data/indices of an object, they dont seem to be in the docs, anyone know where to find them?
Thanks in advance.