I'm using SharpDX to run compute shaders and I use constant buffers for some inputs. I create the constant buffers myself and use them in compute shaders like this:
// 'device' type is SharpDX.Direct3D11.Device
// 'constBuf' type is SharpDX.Direct3D11.Buffer
device.ImmediateContext.ComputeShader.SetConstantBuffer(0, constBuf);
I would like to start using SharpDX.Toolkit to manage constant buffers. The Toolkit gives me objects of type SharpDX.Toolkit.Graphics.Buffer
. How can I use that to set the constant buffer for my compute shader?