Go DirectX and. net[|

Source: Internet
Author: User
Tags windows x64 visual studio 2010

With the DirectX SDK (June) release and the addition of support for Visual Studio, I ' ve been seeing a lot of que Stions of the form:

How does I create a DirectX. NET application in Visual Studio 2010? I can ' t find Microsoft.directx to add to my project but I have the DirectX SDK (June) release installed.

As with many seemingly simple questions in a technical topic, this one is actually quite complex.

Back in the days of DirectX 7 and DirectX 8, there is support included for using DirectX from Visual Basic. While most developers used DirectX APIs via C and C + +, there is intense interest in the hobbyist community to access this Technology. Thus the focus on enabling Visual Basic developers. When working in DirectX 9, Visual Basic had become unified with the. NET family of languages and thus  Managed Dir ECTX 1.1  was created (with a great deal of individual passion and effort From tom miller and others on The DirectX team at the time). It is designed for the. NET 1.1 Runtime, and include managed wrappers for the whole family of DirectX technology:direct3 D 9, d3dx9, DXDIAG, DirectDraw, DirectInput, DirectPlay, DirectSound, and a simple wrapper for DirectShow. The focus shifted from the Visual Basic language to C #, although VB. NET could still be used.

Note:  the DirectX 7 and 8 Visual Basic 6.0 Support I mention here is no longer available as of Wi Ndows Vista. It is part of DirectX 9.0c and is included with Windows XP Service Pack 2&3, Windows Server 2003 Service Pack 1 & ; 2, and Windows XP Professional x64 Edition.

With the release of. NET 2.0, there is an effort to update Managed DirectX to use the new constructs and in 2005 there WA S a Managed DirectX 2.0 Beta included as part of the DirectX SDK. As this effort is underway, a major reorganization at Microsoft took place and when the dust settled, the relatively smal L team that had been working on this technology suddenly found themselves as the seed of a entirely new effort around. NET Gaming development: xna Game Studio. The Managed DirectX 2.0 project is shelved, and all the effort focused on this new more comprehensive end-to-end solution For the indie game developers targeting Windows, Xbox, Zune, and eventually Windows Phone 7.

Managed DirectX 1.1 As it stands today is deprecated. It is last updated in April 2006 to match this version of D3DX9, while the Managed DirectX 1.1 documentation is last UPD Ated in August 2005. The last DirectX SDK to include the samples and documentation for Managed DirectX 1.1 is August 2006. Since that time, we ' ve continued to include the Managed DirectX 1.1 assemblies in the DirectX SDK Developer Runtime, the D Irectsetup REDIST folder, the DirectX End-User Runtime package, and the DirectX End-User runtime Web Installer to simplify Legacy deployment and support existing applications the relied on it. This last support for Managed DirectX 1.1 deployment are likely to being removed in a future DirectX SDK update.

At this point, Managed DirectX 1.1 are really beginning to show it's age.

  • Since the last version of D3DX9 supported by Managed DirectX 1.1 are April 2006, it makes use of a very outdated version of The HLSL compiler.
  • The Managed DirectX 1.1 assemblies is 32-bit only, so you cannot use them from an x64 native. NET Application /platform:anycpu Windows x64 System). You must build with and /platform:x86 stay within the limits of the 2 GB memory space of 32-bit applications.
  • The assemblies only support the Legacy DirectX API set, with no support for Direct3D9Ex, Direct3D 10.x, Direct3D one, Direc T2D, DirectWrite, DXGI, d3dx10, d3dx11, XAUDIO2, XACT, XINPUT, etc.
  • Since Managed DirectX 2.0 is never released in production form, the Managed DirectX 1.1 assemblies still reflect. NET 1.1 Design principles and does not support or make use of. NET 2.0 constructs.
  • Managed DirectX 1.1 while compatible with. NET 2.0 (and the. NET 3.0 and. NET 3.5 extensions of the 2.0 runtime), was not C Ompatible with. NET 4.0

The last bullet are the heart of the issue I started out with the this post. The Visual Studio toolset only supports developing. NET 4.0 applications, and therefore Managed DirectX 1.1 as a. Net 1.1 Technology is not supported by Visual Studio 2010. BTW, it is possible to use the Visual Studio in IDE to build. NET 2.0 applications using older Toolsets through Multi-ta Rgeting, but this is really using the legacy tools which do work with. NET 1.1 ERA assemblies.

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

  • XNA Game Studio  is the solution aimed directly at indie Game developers looking to create Direct3D games On Windows, Xbox, Zune, and Windows Phone 7. It has some limitations (requires /platform:x86 , no support for DirectX 10.x or DirectX one-by-one, more focused Direc TX API Support, no to Windows Store or Windows Phone, content pipeline only works with VS., but includes Num Erous Tools and a vibrant developer community. Those original hobbyist developers Tom Miller wanted to help was very well served by this product, as is the professional and indie game developer looking for a complete solution for writing. NET games.  Monogame is also an open-so Urce alternative to XNA Game Studio.
  • For a developer using the Windows Presentation Foundation but wants to use the new DirectX one-to-one APIs, the Windows API Code P ACK provides managed assemblies for Direct3D 10.1, Direct3D One, Direct2D, DirectWrite, DXGI, and the Windows Imaging Libra Ry (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 is invested in Managed DirectX 1.1 but is looking for updates to address the limitations I Note above For Win32 desktop applications, the open source SLIMDX library are designed to mimic Managed DirectX 1.1 for just this pur Pose. It includes support for x64 native ' anycpu ' applications, includes modern DirectX support, and was compatible with the. NET 4.0 runtime.
  • SHARPDX another option for C # and is currently the preferred solution for ' modern ' Microsoft platforms including Windows S Tore and Windows phone 8.
  • If you is a media developer using DirectShow and want a more complete solution than the simple Managed DirectX 1.1 Wrappe R, the open source directshow.net Library May is useful to you, although it doesn ' t yet appear to having been updat Ed to IS. NET 4.0 compatible.

If These solutions don ' t work for you, you can always write your own managed wrapper using standard native interop Constru CTS or use Managed C + +/CLI-to-write the DirectX portion of your application in A/C + + using the DirectX SDK. The Windows Presentation Foundation D3dimage class can be a useful-do-this interop, although the use of Direct3D9Ex On the Windows Vista and Windows 7 can cause some problems with the components like d3dx9 which your should watch out for.

. NET 1.1 Framework: Note that the. NET 1.1 Framework isn't supported on either Windows 7 or Windows 8.x.

win2d: Another option to consider is Shawnhar's latest project for using direct2d/directwrite from C # or C++/CX.

Original link: DirectX and. NET

Go DirectX and. net[|

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.