|
本人初次接触DirectX编程, 贴几篇代码, 请大家多多指教!
Introducing DirectX 9.0 for Managed Code
--------------------------------------------------------------------------------
Microsoft DirectX is a set of low-level application programming interfaces (APIs) for creating games and other high-performance multimedia applications. It includes support for two-dimensional (2-D) and three-dimensional (3-D) graphics, sound effects and music, input devices, and networked applications such as multiplayer games.
Managed DirectX
With DirectX 9.0, developers can take advantage of DirectX multimedia functionality and hardware acceleration while using managed code. Managed DirectX enables access to most of the original unmanaged DirectX functionality. The following are the managed code languages supported by DirectX 9.0 and documented in the software development kit (SDK).
Microsoft Visual C#™
Microsoft Visual Basic .NET
Microsoft Visual C++
Microsoft JScript .NET
Components
Managed DirectX 9.0 is made up of the following major components.
Direct3D Graphics provides a single API that you can use for 3-D graphics programming.
DirectDraw provides direct low-level access to video memory for high-speed rendering.
DirectInput provides support for a variety of input devices, including full support for force-feedback technology.
DirectPlay provides support for multiplayer networked games.
DirectSound provides support for playing and capturing prerecorded digital samples.
Audio Video Playback allows for playback and simple control of audio and video media.
Benefits of Managed DirectX
By eliminating the Component Object Model (COM) interoperability layer, Managed DirectX improves performance. Managed code can reduce the volume of code and increase productivity. The interface is more intuitive, inheriting from the powerful and easy-to-use Microsoft .NET Framework common types. Managed code also frees you from having to deal with most memory management tasks, such as releasing objects. In the SDK you will find managed Visual Basic .NET and Visual C# samples and tutorials that duplicate nearly all of the unmanaged code samples.
|
|