Fixes 08 (#98)
- fix hull builder face and edge leak - fix #95 - samples app will no longer crash if data folder is not found
This commit is contained in:
parent
23861418d8
commit
c52908c9a9
11 changed files with 307 additions and 153 deletions
|
|
@ -499,9 +499,10 @@ public:
|
|||
AddGroundBox( 20.0f );
|
||||
|
||||
// Mesh
|
||||
{
|
||||
m_meshData = CreateMeshData( "data/meshes/conveyor.obj", 1.0f, false, true, true, true );
|
||||
m_meshData = CreateMeshData( "data/meshes/conveyor.obj", 1.0f, false, true, true, true );
|
||||
|
||||
if ( m_meshData != nullptr )
|
||||
{
|
||||
int triangleCount = m_meshData->triangleCount;
|
||||
|
||||
uint8_t* materialIndices = (uint8_t*)( (intptr_t)m_meshData + m_meshData->materialOffset );
|
||||
|
|
@ -620,7 +621,7 @@ public:
|
|||
|
||||
~ConveyorMesh() override
|
||||
{
|
||||
b3DestroyMesh( m_meshData );
|
||||
DestroyMeshData( m_meshData );
|
||||
b3DestroyHull( m_cylinderHull );
|
||||
}
|
||||
|
||||
|
|
@ -628,6 +629,11 @@ public:
|
|||
{
|
||||
Sample::Render();
|
||||
|
||||
if ( m_meshData == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int triangleCount = m_meshData->triangleCount;
|
||||
const b3MeshTriangle* triangles = b3GetMeshTriangles( m_meshData );
|
||||
const b3Vec3* vertices = b3GetMeshVertices( m_meshData );
|
||||
|
|
|
|||
Loading…
Reference in a new issue