Ejemplo n.º 1
0
        public Program()
        {
            _app                   = new GrasshopperApp().UseSharpDX();
            _graphics              = _app.Graphics.CreateContext(enableDebugMode: true);
            _renderTarget          = _graphics.RenderTargetFactory.CreateWindow();
            _constantBufferManager = _graphics.ConstantBufferManagerFactory.Create <Matrix4x4>();
            _meshBufferManager     = new MeshBufferManager <Vertex>(_graphics);

            _renderTarget.Window.Title   = "Simple Cube";
            _renderTarget.Window.Visible = true;
        }
Ejemplo n.º 2
0
        public Program()
        {
            _app = new GrasshopperApp().UseSharpDX();
            _graphics = _app.Graphics.CreateContext(enableDebugMode: true);
            _renderTarget = _graphics.RenderTargetFactory.CreateWindow();
            _constantBufferManager = _graphics.ConstantBufferManagerFactory.Create<Matrix4x4>();
            _meshBufferManager = new MeshBufferManager<Vertex>(_graphics);

            _renderTarget.Window.Title = "Simple Cube";
            _renderTarget.Window.Visible = true;
        }
Ejemplo n.º 3
0
        public Program()
        {
            _app                   = new GrasshopperApp().UseSharpDX();
            _graphics              = _app.Graphics.CreateContext(enableDebugMode: true);
            _renderTarget          = _graphics.RenderTargetFactory.CreateWindow();
            _constantBufferManager = _graphics.ConstantBufferManagerFactory.Create <SceneData>();
            _meshBufferManager     = new MeshBufferManager <Vertex>(_graphics);
            _instanceBufferManager = _graphics.VertexBufferManagerFactory.Create <CubeInstance>();

            _renderTarget.Window.Title   = "Many Cubes";
            _renderTarget.Window.Visible = true;
        }
Ejemplo n.º 4
0
        public Program()
        {
            _app = new GrasshopperApp()
                   .UseSharpDX()
                   .UseWindowsFileSystem();

            _graphics              = _app.Graphics.CreateContext(enableDebugMode: true);
            _renderTarget          = _graphics.RenderTargetFactory.CreateWindow();
            _constantBufferManager = _graphics.ConstantBufferManagerFactory.Create <SceneData>();
            _meshBufferManager     = new MeshBufferManager <Vertex>(_graphics);
            _instanceBufferManager = _graphics.VertexBufferManagerFactory.Create <CubeInstance>();

            _renderTarget.Window.Title   = "Flying Through Cubes";
            _renderTarget.Window.Visible = true;
            _renderTarget.Window.SetFullScreen();
            _renderTarget.Window.SizeChanged += UpdateAspectRatio;

            UpdateAspectRatio(_renderTarget.Window);
        }
Ejemplo n.º 5
0
        public Program()
        {
            _app = new GrasshopperApp()
                .UseSharpDX()
                .UseWindowsFileSystem();

            _graphics = _app.Graphics.CreateContext(enableDebugMode: true);
            _renderTarget = _graphics.RenderTargetFactory.CreateWindow();
            _constantBufferManager = _graphics.ConstantBufferManagerFactory.Create<SceneData>();
            _meshBufferManager = new MeshBufferManager<Vertex>(_graphics);
            _instanceBufferManager = _graphics.VertexBufferManagerFactory.Create<CubeInstance>();

            _renderTarget.Window.Title = "Flying Through Cubes";
            _renderTarget.Window.Visible = true;
            _renderTarget.Window.SetFullScreen();
            _renderTarget.Window.SizeChanged += UpdateAspectRatio;

            UpdateAspectRatio(_renderTarget.Window);
        }
Ejemplo n.º 6
0
        public Program()
        {
            _app = new GrasshopperApp()
                .UseSharpDX()
                .UseWindowsFileSystem();
            _graphics = _app.Graphics.CreateContext(enableDebugMode: true);
            _renderTarget = _graphics.RenderTargetFactory.CreateWindow();
            _constantBufferManager = _graphics.ConstantBufferManagerFactory.Create<SceneData>();
            _meshBufferManager = new MeshBufferManager<Vertex>(_graphics);
            _instanceBufferManager = _graphics.VertexBufferManagerFactory.Create<CubeInstance>();

            _renderTarget.Window.Title = "Many Textured Cubes";
            _renderTarget.Window.Visible = true;
        }