void OpenGL3CoreRenderer::renderPhysicsWorld(const btDiscreteDynamicsWorld* world) { //sync changes from physics world to render world //for now, we don't deal with adding/removing objects to the world during the simulation, to keep the rendererer simpler m_instanceRenderer->writeTransforms(); static bool syncOnly=false; graphics_from_physics(*m_instanceRenderer,syncOnly,world); syncOnly= true; //render m_instanceRenderer->RenderScene(); }
void sync_graphics_to_physics_objects(GLInstancingRenderer& renderer) { graphics_from_physics(renderer,true); }
void create_graphics_from_physics_objects(GLInstancingRenderer& renderer) { graphics_from_physics(renderer,false); }