Пример #1
0
void Screen::initD3D()
{
	//do all D3D initialization
	if (!createSCandDevice())
	{
		_badInit = true;
		return;
	}
	createRT();
	createVP();
	createDS();
	createSM();
	createSSAO();
	createEffect();
	parseEffect();
	createVL();
	//create the light
	light = new AMLight(D3DXVECTOR3(0.0f, 0.0f, -1.0f));
	//set up the physics engine
	physics.setup(30, settings.getGravityMul());
	_pDebug = new AMPhysicsDebug(d3ddev, effectTech);
	//only wireframe supported for physics debug
	_pDebug->setDebugMode(AMPhysicsDebug::DBG_DrawWireframe);
	physics.getWorld()->setDebugDrawer(_pDebug);
}
Пример #2
0
 osg::Group* run( osg::Node* earth )
 {   
     osg::Group* g = new osg::Group();
     g->addChild( earth );
     g->getOrCreateStateSet()->setAttribute( createVP() );
     g->getOrCreateStateSet()->setAttributeAndModes(new osg::CullFace(osg::CullFace::BACK));
     return g;
 }