Exemplo n.º 1
0
        public override void InitBuffers(Device d3d, DeviceContext deviceContext)
        {
            if (boundingBox != null)
            {
                boundingBox.InitBuffers(d3d, deviceContext);
            }

            if (lines != null)
            {
                for (int i = 0; i < lines.Count; i++)
                {
                    lines[i].InitBuffers(d3d, deviceContext);
                }
            }
        }
Exemplo n.º 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);
 }