Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Feb 17, 2012 10:29 am 
Offline

Joined: Wed Jan 25, 2012 6:32 pm
Posts: 16
It seems that btGenerateInternalEdgeInfo locks vertex buffer of striding mesh interface twice:

Before the (triangleIndex, numFaces) loop:
Code:
...
meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts,   type,stride,&indexbase,indexstride,numfaces,indicestype,partId);
...


then, in the end of the loop:
Code:
    trimeshShape->processAllTriangles(&connectivityProcessor,aabbMin,aabbMax);
}


which tries to lock the same buffer again during callback:
Code:
      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'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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group