Version 1.0.2902: Microsoft.directx.direct3d

Here is an example of how to use Direct3D in a C# application:

Microsoft DirectX Direct3D Version 1.0.2902: An Overview** Microsoft.directx.direct3d Version 1.0.2902

using Microsoft.DirectX; using Microsoft.DirectX.Direct3D; class Direct3DExample { public static void Main() { // Create a new Direct3D device Device device = new Device(0, DeviceType.Hardware, IntPtr.Zero, CreateFlags.SoftwareVertexProcessing, new PresentParameters()); // Set up the device and render a triangle device.Clear(ClearFlags.Target, Color.CornflowerBlue, 1.0f, 0); device.BeginScene(); device.DrawUserPrimitives(PrimitiveType.TriangleList, 1, 3, new CustomVertex.PositionColored[] { new CustomVertex.PositionColored(new Vector3(-1, -1, 0), Color.Red), new CustomVertex.PositionColored(new Vector3(0, 1, 0), Color.Green), new CustomVertex.PositionColored(new Vector3(1, -1, 0), Color.Blue) }); device.EndScene(); device.Present(); } } Here is an example of how to use

Ads - Before Footer