Beispiel #1
0
        protected override void Draw()
        {
            _commandList.Begin("Clear", _simplePipeline);
            _commandList.SetRenderTarget(BackBufferView, BackBufferDepthStencilView);
            _commandList.ClearRenderTarget(BackBufferView, new Vector4(0.0863f, 0.0353f, 0.0706f, 1.0f));
            _commandList.ClearDepthStencil(BackBufferDepthStencilView, 1.0f, 1);

            _commandList.SetVertexBuffer(_cubeVertexBuffer);
            _commandList.SetConstantBuffer(_leftConstantBuffer, BufferScope.VertexShader);
            _commandList.Draw(36);
            _commandList.End();

            _commandList.Begin("SimpleTextured", _texturedPipeline);
            _commandList.SetVertexBuffer(_texturedVertexBuffer);
            _commandList.SetConstantBuffer(_rightConstantBuffer, BufferScope.VertexShader);
            _commandList.SetSampler(_simpleSampler);
            _commandList.SetTexture(_simpleTexture.View);
            _commandList.Draw(3);
            _commandList.End();

            _commandList.Submit();
        }