现在的位置: 首页 > 综合 > 正文

Using the DirectX Sample Framework

2013年04月11日 ⁄ 综合 ⁄ 共 988字 ⁄ 字号 评论关闭

Using the DirectX Sample Framework

When building the project in previous artical :Introduction, I got many errors. To solve that, fist, follow the instructions below:

The Microsoft DirectX 9.0 for Managed Code sample framework is included in the DirectX software development kit (SDK) as C# source files that you can include in your application. They are located in the following directory:

(SDK root)/Samples/Managed/Common

To include the functionality of the sample framework in an application you can either start your application with the EmptyProject Direct3D Sample or do the following:

  • Add the following classes to your project:

    • dxmut.cs
    • dxmutdata.cs
    • dxmutenum.cs
    • dxmutexception.cs
    • dxmutgui.cs
    • dxmutmesh.cs
    • dxmutmisc.cs
    • dxmutSettingsDlg.cs
  • Add references to the following dynamic-link libraries (DLLs) to your project:
    • Microsoft.DirectX.dll
    • Microsoft.DirectX.Direct3D.dll
    • Microsoft.DirectX.Direct3DX.dll
  • Set the "Allow Unsafe Code Blocks" build flag for your project to true

After above operations, you'd better add all the files under the "(DirectX SDK Directory)/Samples/Managed/Common" directory except the AssemblyInfo.cs!

抱歉!评论已关闭.