class Program { private static Device _device; private static SwapChain _swapChain; private static Texture2D _texture; private static ShaderResourceView _textureView;
Here's a useful piece of code to get you started: slim dx version 4.0 13.43
context.InputAssembler.InputLayout = InputLayout.FromDescription(_device, typeof(Vertex), new[] { new InputElement("POSITION", 0, Format.R32G32B32_Float, 0, 0), new InputElement("TEXCOORD", 0, Format.R32G32_Float, 12, 0) }); class Program { private static Device _device; private
SlimDX Version 4.0.13.43: A Guide to the Legacy DirectX Wrapper private static SwapChain _swapChain
static void Main(string[] args) { // Create the device and swap chain var windowHandle = System.Windows.Forms.Application.OpenForms[0].Handle; var desc = new SwapChainDescription() { BufferCount = 1, IsWindowed = true, ModeDescription = new ModeDescription(800, 600, new Rational(60, 1), Format.R8G8B8A8_UNorm), OutputHandle = windowHandle, SampleDescription = new SampleDescription(1, 0), Usage = Usage.RenderTargetOutput };