- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When iterating over the PXCBlock data returned from DoMeshingUpdate, there are blocks that have zero for numFaces and numVertices. In the examples, this is handled by something along the lines of :
if( (pPXCBlockMeshData->numVertices > 0) && ( pPXCBlockMeshData->numFaces > 0) )
... process data ...
Looking over the Unity sample, I noticed that that code will instead add the mesh id of these meshes to a destruction queue and then delete the mesh, if ti exists.
There's nothing in the SDK docs that specifies that there will be meshes with no data or what to do with them.
There's nothing in the header files that specifies that there will be meshes with no data or what to do with them.
There's nothing in the C++ samples that does anything with meshes with zero data.
So, what is the going on with these meshes ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mesh block with same id and vertices = 0-> Yes it means block has been modified and now contains 0 vertices -> delete the block
In our C++ sample code, we are clearly deleting blocks.
it = m_currentMeshes.find(iMeshId); if (it != m_currentMeshes.end()) { // delete old buffer glDeleteLists(it->second, 1); // delete old item m_currentMeshes.erase(it); } --------------Only create if vertices count is >0--------------------- // create new buffers if((pPXCBlockMeshData->numVertices > 0) && (pPXCBlockMeshData->numFaces > 0)) { // create new GL list ..... }
Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page