コード例 #1
0
        public void Render(IDeviceContext context, ITexture2D meshRenderTexture)
        {
            context.SetRenderTarget(_backBuffer, _depthStencil);
            context.ClearRenderTarget(_backBuffer, Color.Red);
            context.ClearDepthStencil(_depthStencil);

            context.SetInputLayout(_inputLayout);

            context.SetVertexBuffer(_vertexBuffer);
            context.SetIndexBuffer(_indexBuffer);

            context.SetPixelShader(_pixelShader);
            context.SetVertexShader(_vertexShader);


            context.SetPixelShaderResource(meshRenderTexture);

            context.DrawIndexed(6, 0, 0);
        }