public bool InitScene(int width, int height)
 {
     Camera          = new Camera();
     Camera.Position = new Vector3(0, 0, 15);
     Camera.SetProjectionMatrix(width, height);
     ClearRenderStack();
     Light = new LightClass();
     Light.SetAmbientColor(0.5f, 0.5f, 0.5f, 1f);
     Light.SetDiffuseColour(0.5f, 0.5f, 0.5f, 1f);
     Light.Direction = new Vector3(-0.2f, -1f, -0.3f);
     Light.SetSpecularColor(1.0f, 1.0f, 1.0f, 1.0f);
     Light.SetSpecularPower(255.0f);
     Input = new InputClass();
     Input.Init();
     return(true);
 }
Exemple #2
0
 public bool InitScene(int width, int height)
 {
     WorldSettings = new WorldSettings();
     WorldSettings.SetupLighting();
     Camera          = new Camera();
     Camera.Position = new Vector3(0.0f, 0.0f, 15.0f);
     Camera.SetProjectionMatrix(width, height);
     ClearRenderStack();
     selectionBox.InitBuffers(D3D.Device, D3D.DeviceContext);
     TranslationGizmo.InitBuffers(D3D.Device, D3D.DeviceContext);
     sky.InitBuffers(D3D.Device, D3D.DeviceContext);
     sky.DoRender = WorldSettings.RenderSky;
     clouds.InitBuffers(D3D.Device, D3D.DeviceContext);
     Input = new InputClass();
     Input.Init();
     return(true);
 }