示例#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();
}
示例#2
0
void sync_graphics_to_physics_objects(GLInstancingRenderer& renderer)
{
	graphics_from_physics(renderer,true);
}
示例#3
0
void create_graphics_from_physics_objects(GLInstancingRenderer& renderer)
{
	graphics_from_physics(renderer,false);
}