示例#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
bool ATOM_DOFEffect::init(ATOM_RenderDevice *device)
{
	if( !ATOM_PostEffect::init(device) )
		return false;

	// create the material
	if( !createMaterial(device) )
		return false;


	// create the rt
	if( !createRT(device) )
		return false;

	return true;
}