Modifying knight example to have multiple same particle emitters and then removing them:
Code:
...
std::vector<H3DNode> m_nodes;
...
particleSysRes = h3dAddResource( H3DResTypes::SceneGraph, "particles/particleSys1/particleSys1.scene.xml", 0 );
...
for(int i=0; i<10; i++)
{
H3DNode _particleSys = h3dAddNodes( hand, particleSysRes );
h3dSetNodeTransform( _particleSys, 0, 40, 0, 90, 0, 0, 1, 1, 1 );
m_nodes.push_back(_particleSys);
}
...
...
void Application:mainLoop( float fps )
{
...
if(glfwGetKey('U') && !ok)
{
for(int i=0; i<m_nodes.size(); ++i)
{
h3dRemoveNode(m_nodes[i]);
}
ok=true;
}
...
}
this crashes at h3dRemoveNode()...