Original Post
While in the default Debug Solution Configuration, my meshes render as arbitrary artifacts. This only occurs when my mesh wrapper is initialized with 'new'. Note: I've tried every order possible between the two mesh wrappers, and the mesh is ALWAYS created the same way and seems valid when rendering (how can I check this for sure?). After looking for a while, I haven't been able to find a reason for this. What differences do heap allocations have in debug mode vs release mode? Or am I doing something wrong? [Edited by - PSS on April 23, 2009 11:51:59 AM]
...
CMeshWrapper* m_pEnt;
CMeshWrapper m_Ent;
...
OnCreate( ... )
{
m_pEnt = new CMeshWrapper(); //Constructor sets internal mesh to NULL
m_pEnt->SetMesh( "mesh.x" ); //Creates the mesh
m_Ent.SetMesh( "mesh.x" ); //Creates the mesh
}
OnRender( ... )
{
...
m_pEnt->Render( ... );
m_Ent.Render( ... );
...
}