btGenerateInternalEdgeInfo double vertex buffer locking
Posted: Fri Feb 17, 2012 10:29 am
It seems that btGenerateInternalEdgeInfo locks vertex buffer of striding mesh interface twice:
Before the (triangleIndex, numFaces) loop:
then, in the end of the loop:
which tries to lock the same buffer again during callback:
I'm using ogre, and in desktop GL hardware buffers implementation it throws an exception while trying to lock an already locked buffer.
I also don't see where btGenerateInternalEdgeInfo unlocks the buffer.
Before the (triangleIndex, numFaces) loop:
Code: Select all
...
meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,partId);
...
Code: Select all
trimeshShape->processAllTriangles(&connectivityProcessor,aabbMin,aabbMax);
}
Code: Select all
virtual void processNode(int nodeSubPart, int nodeTriangleIndex)
{
const unsigned char *vertexbase;
int numverts;
PHY_ScalarType type;
int stride;
const unsigned char *indexbase;
int indexstride;
int numfaces;
PHY_ScalarType indicestype;
m_meshInterface->getLockedReadOnlyVertexIndexBase(
&vertexbase,
numverts,
type,
stride,
&indexbase,
indexstride,
numfaces,
indicestype,
nodeSubPart);
I also don't see where btGenerateInternalEdgeInfo unlocks the buffer.