Can I develop a Windows Universal Application using DirectX and C#

雨燕双飞 提交于 2019-12-13 02:16:10

问题


I've seen that there is a template to do so in Visual C++, but not in C#. Have I to stick to C++ to develop a Direct X (Universal) application ??

Can I use C#? If so, how?


回答1:


Have I to stick to C++ to develop a Direct X (Universal) application?

Technically, you can use the DirectX in .NET platform by using the interop technology. SharpDX has done such kind of things for you and you can easily use the DX in you .NET project including the Window 8.1 and Windows Phone 8.1 app project. However, as I just tested, the SharpDX has not supported the Windows Universal App yet.




回答2:


Since you must use C++ when calling DirectX APIs, so if you want to develop your Windows Universal Application by C# and DirectX as the same time, the best practice might be to package all the DirectX related functions in a separate C++ WinRT component. Then you can include it in any C# application.




回答3:


Depending on your needs for DX, you might want to look into the Win2D project from Microsoft, its C# and lets you mix 2d and 3d.



来源:https://stackoverflow.com/questions/32288858/can-i-develop-a-windows-universal-application-using-directx-and-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!