// Present the screen _swapChain.Present(0, PresentFlags.None); } }
This example demonstrates how to load a texture and render a sprite using Slim DX 4.0. slim dx version 4.0 13.43
// Load a texture using (var stream = System.IO.File.OpenRead("texture.png")) { var textureData = Texture2D.FromStream(_device, stream, ImageInformation.FromFile("texture.png")); _texture = textureData; _textureView = new ShaderResourceView(_device, _texture); } // Present the screen _swapChain
Slim DX version 4.0!
Keep in mind that you need to have the Slim DX 4.0 libraries and the DirectX SDK installed to run this code. Also, error checking has been omitted for brevity. // Present the screen _swapChain.Present(0