Dx Version 4.0 13.43 |work|: Slim
context.PixelShader.SetShaderResource(0, _textureView); context.Draw(4, 0);
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) }); slim dx version 4.0 13.43
context.InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleStrip; context.InputAssembler.SetVertexBuffers(0, new[] { new VertexBufferBinding(_device, sprite, 0) }); context
public Vertex(Vector3 position, Vector2 texCoord) { Position = position; TexCoord = texCoord; } } } This example creates a window, loads a texture, and renders a sprite using the texture. Make sure to replace "texture.png" with the path to your own texture file. new[] { new InputElement("POSITION"
This example demonstrates how to load a texture and render a sprite using Slim DX 4.0.
using SlimDX; using SlimDX.Direct3D11; using System;