Does DirectX 11 support .NET?
Asked Answered
W

6

15

Can I use DirectX 11 from C# app?

Need to use DirectSound from WPF application. .NET 4 W7 x64

Wordsworth answered 29/11, 2011 at 4:55 Comment(0)
I
9

From Chuck Walbourn's Blog Titled: Games for Windows and the DirectX SDK. He seems to be recommending the SlimDx Library, according to their documentation it does support DirectSound

From the above blog:

The modern version of the DirectX SDK is designed for C/C++ native developers. If you are looking for .NET solutions for using DirectX technology, there are many options available although the choice of solution depends on your specific needs:

....

•For a developer using the Windows Presentation Foundation but wants to use the new DirectX 11 APIs, the Windows API Code Pack provides managed assemblies for Direct3D 10.1, Direct3D 11, Direct2D, DirectWrite, DXGI, and the Windows Imaging Library (WIC) along with many other Windows 7 features. The latest version supports .NET 4.0, and x64 native “anycpu” applications. Note you still need to install the DirectX SDK to get the HLSL compiler (FXC.EXE) tool.

•For developers who are invested in Managed DirectX 1.1 but are looking for updates to address the limitations I note above, the open source SlimDX library is designed to mimic Managed DirectX 1.1 for just this purpose. It includes support for x64 native “anycpu” applications, includes modern DirectX support, and is compatible with the .NET 4.0 runtime.

....

Insupportable answered 29/11, 2011 at 5:8 Comment(0)
M
10

You may also want to consider the newer SharpDX. The biggest differences from SlimDX are that it doesn't support DX9 (though that's irrelevant here), and the API is directly generated from the DX SDK headers. You could even begin making Metro style apps in Windows 8 because it's ready to support Direct3D 11.1.

Minter answered 1/12, 2011 at 8:42 Comment(0)
I
9

From Chuck Walbourn's Blog Titled: Games for Windows and the DirectX SDK. He seems to be recommending the SlimDx Library, according to their documentation it does support DirectSound

From the above blog:

The modern version of the DirectX SDK is designed for C/C++ native developers. If you are looking for .NET solutions for using DirectX technology, there are many options available although the choice of solution depends on your specific needs:

....

•For a developer using the Windows Presentation Foundation but wants to use the new DirectX 11 APIs, the Windows API Code Pack provides managed assemblies for Direct3D 10.1, Direct3D 11, Direct2D, DirectWrite, DXGI, and the Windows Imaging Library (WIC) along with many other Windows 7 features. The latest version supports .NET 4.0, and x64 native “anycpu” applications. Note you still need to install the DirectX SDK to get the HLSL compiler (FXC.EXE) tool.

•For developers who are invested in Managed DirectX 1.1 but are looking for updates to address the limitations I note above, the open source SlimDX library is designed to mimic Managed DirectX 1.1 for just this purpose. It includes support for x64 native “anycpu” applications, includes modern DirectX support, and is compatible with the .NET 4.0 runtime.

....

Insupportable answered 29/11, 2011 at 5:8 Comment(0)
R
4

If you want to use DirectX 11 with C# you need a wrapper Look at the following link http://slimdx.org/

Reiss answered 29/11, 2011 at 5:9 Comment(0)
S
4

Unfortunately, both SlimDX as well as SharpDX are no longer being developed. They both still work, even with .NET6.0 (as far as I can tell), but no new features or bug fixes will make it into these.

The .NET Foundation has a new project Silk.NET that apparently targets to become a replacement for the former two and is still being developed. When I have to update my projects that currently use SlimDX I'll take a look at it.

Selfanalysis answered 4/4, 2022 at 11:55 Comment(0)
E
1

Here is one way I have found. First you need to install DXSDK (I have June 2010 and SDK for Windows 7). Go to "Add reference" dialog press "Browse" , go to "C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0" or "C:\Windows\Microsoft.NET\Managed DirectX\v9.02.2904" then choose proper dll. For example - Microsoft.DirectX.dll. Then add "using Microsoft.DirectX" directive to your project.

Earlie answered 15/11, 2013 at 10:51 Comment(0)
S
1

Bop, if you are just plan on just playing sounds then FMOD is another alternative, there is a C# wrapper available for this. If you plan on more than this, then I would like above recommend Sharpdx as it is still being supported.

Stempson answered 13/6, 2017 at 22:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.