I would like to press a key to save the whole world to a backup, and load it when i press another, so i use it at run time. It is possible?
I'm trying something like this with no success:
Code: Select all
btDynamicsWorld * backw;
.
.
.
//save
case GLUT_KEY_F7 :{
backw=new btDiscreteDynamicsWorld((const btDiscreteDynamicsWorld &)m_dynamicsWorld);
}
//load
case GLUT_KEY_F8 :{
m_dynamicsWorld=new btDiscreteDynamicsWorld((const btDiscreteDynamicsWorld &)backw);
}