Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
void sync_graphics_to_physics_objects(GLInstancingRenderer& renderer)
{
	graphics_from_physics(renderer,true);
}
Exemplo n.º 3
0
void create_graphics_from_physics_objects(GLInstancingRenderer& renderer)
{
	graphics_from_physics(renderer,false);
}