public override bool Init() { if (!base.Init()) { return(false); } Effects.InitAll(Device); InputLayouts.InitAll(Device); RenderStates.InitAll(Device); _texMgr = new TextureManager(); _texMgr.Init(Device); _bunnyModel = BasicModel.LoadSdkMesh(Device, _texMgr, "Models/bunny.sdkmesh", "Textures"); _bunnyInstance = new BasicModelInstance(_bunnyModel) { World = Matrix.Scaling(0.1f, 0.1f, 0.1f) }; _effect = new ForwardLightingEffect(Device, "FX/forwardLight.fxo"); var passDesc = _effect.Ambient.GetPassByIndex(0).Description; _layout = new InputLayout(Device, passDesc.Signature, InputLayoutDescriptions.PosNormalTexTan); AddUIElements(); return(true); }
public override bool Init() { if (!base.Init()) return false; Effects.InitAll(Device); InputLayouts.InitAll(Device); RenderStates.InitAll(Device); _texMgr = new TextureManager(); _texMgr.Init(Device); _bunnyModel = BasicModel.LoadSdkMesh(Device, _texMgr, "Models/bunny.sdkmesh", "Textures"); _bunnyInstance = new BasicModelInstance(_bunnyModel) { World = Matrix.Scaling(0.1f, 0.1f, 0.1f) }; _effect = new ForwardLightingEffect(Device, "FX/forwardLight.fxo"); var passDesc = _effect.Ambient.GetPassByIndex(0).Description; _layout = new InputLayout(Device, passDesc.Signature, InputLayoutDescriptions.PosNormalTexTan); AddUIElements(); return true; }