├── Lib ├── x64 │ ├── d2d1.lib │ ├── d3d9.lib │ ├── dxgi.lib │ ├── D3DCSX.lib │ ├── D3DCSXd.lib │ ├── DxErr.lib │ ├── XAPOFX.lib │ ├── XInput.lib │ ├── d3d10.lib │ ├── d3d10_1.lib │ ├── d3d11.lib │ ├── d3dx10.lib │ ├── d3dx10d.lib │ ├── d3dx11.lib │ ├── d3dx11d.lib │ ├── d3dx9.lib │ ├── d3dx9d.lib │ ├── d3dxof.lib │ ├── dinput8.lib │ ├── dsound.lib │ ├── dwrite.lib │ ├── dxguid.lib │ ├── X3DAudio.lib │ ├── xapobase.lib │ ├── xapobased.lib │ └── d3dcompiler.lib └── x86 │ ├── d2d1.lib │ ├── d3d9.lib │ ├── dxgi.lib │ ├── D3DCSX.lib │ ├── D3DCSXd.lib │ ├── DxErr.lib │ ├── XAPOFX.lib │ ├── XInput.lib │ ├── d3d10.lib │ ├── d3d10_1.lib │ ├── d3d11.lib │ ├── d3dx10.lib │ ├── d3dx10d.lib │ ├── d3dx11.lib │ ├── d3dx11d.lib │ ├── d3dx9.lib │ ├── d3dx9d.lib │ ├── d3dxof.lib │ ├── dinput8.lib │ ├── dsetup.lib │ ├── dsound.lib │ ├── dwrite.lib │ ├── dxguid.lib │ ├── X3DAudio.lib │ ├── xapobase.lib │ ├── xapobased.lib │ └── d3dcompiler.lib ├── Redist ├── DSETUP.dll ├── DXSETUP.exe └── dsetup32.dll ├── Developer Runtime ├── x64 │ ├── D3D10Ref.DLL │ ├── D3D11Ref.dll │ ├── d3dref9.dll │ ├── D3DCSXd_43.dll │ ├── D3DX10d_43.dll │ ├── D3DX11d_43.dll │ ├── D3DX9d_43.dll │ ├── XAPOFXD1_5.dll │ ├── XAudioD2_7.dll │ ├── d3dx9d_33.dll │ ├── X3DAudioD1_7.dll │ ├── D3D10SDKLayers.DLL │ ├── D3D11SDKLayers.dll │ ├── XactEngineA3_7.dll │ └── XactEngineD3_7.dll └── x86 │ ├── D3D10Ref.DLL │ ├── D3D11Ref.dll │ ├── d3dref9.dll │ ├── D3DCSXd_43.dll │ ├── D3DX10d_43.dll │ ├── D3DX11d_43.dll │ ├── D3dx9d_43.dll │ ├── XAPOFXD1_5.dll │ ├── XAudioD2_7.dll │ ├── d3dx9d_33.dll │ ├── X3DAudioD1_7.dll │ ├── D3D10SDKLayers.DLL │ ├── D3D11SDKLayers.dll │ ├── XactEngineA3_7.dll │ └── XactEngineD3_7.dll ├── Extras └── DirectSound │ └── Debug │ ├── x64 │ └── dsound.dll │ └── x86 │ └── dsound.dll ├── README.md ├── .gitattributes ├── Include ├── dxsdkver.h ├── D3DX10.h ├── D3DX11.h ├── d3dx9.h ├── Dcommon.h ├── comdecl.h ├── DxErr.h ├── D2DBaseTypes.h ├── D3DX11core.h ├── DXGIType.h ├── d3d10misc.h ├── DXGIFormat.h ├── PIXPlugin.h ├── D2Derr.h ├── XAPOFX.h ├── d3dx9shape.h ├── dxdiag.h ├── dxfile.h ├── D3DX11async.h ├── rmxfguid.h ├── dsetup.h ├── XInput.h ├── dsconf.h ├── xact3d3.h ├── audiodefs.h ├── D3DX10mesh.h ├── d3dx9xof.h └── D3D10_1shader.h └── .gitignore /Lib/x64/d2d1.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d2d1.lib -------------------------------------------------------------------------------- /Lib/x64/d3d9.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3d9.lib -------------------------------------------------------------------------------- /Lib/x64/dxgi.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/dxgi.lib -------------------------------------------------------------------------------- /Lib/x86/d2d1.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d2d1.lib -------------------------------------------------------------------------------- /Lib/x86/d3d9.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3d9.lib -------------------------------------------------------------------------------- /Lib/x86/dxgi.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/dxgi.lib -------------------------------------------------------------------------------- /Lib/x64/D3DCSX.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/D3DCSX.lib -------------------------------------------------------------------------------- /Lib/x64/D3DCSXd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/D3DCSXd.lib -------------------------------------------------------------------------------- /Lib/x64/DxErr.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/DxErr.lib -------------------------------------------------------------------------------- /Lib/x64/XAPOFX.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/XAPOFX.lib -------------------------------------------------------------------------------- /Lib/x64/XInput.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/XInput.lib -------------------------------------------------------------------------------- /Lib/x64/d3d10.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3d10.lib -------------------------------------------------------------------------------- /Lib/x64/d3d10_1.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3d10_1.lib -------------------------------------------------------------------------------- /Lib/x64/d3d11.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3d11.lib -------------------------------------------------------------------------------- /Lib/x64/d3dx10.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dx10.lib -------------------------------------------------------------------------------- /Lib/x64/d3dx10d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dx10d.lib -------------------------------------------------------------------------------- /Lib/x64/d3dx11.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dx11.lib -------------------------------------------------------------------------------- /Lib/x64/d3dx11d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dx11d.lib -------------------------------------------------------------------------------- /Lib/x64/d3dx9.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dx9.lib -------------------------------------------------------------------------------- /Lib/x64/d3dx9d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dx9d.lib -------------------------------------------------------------------------------- /Lib/x64/d3dxof.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dxof.lib -------------------------------------------------------------------------------- /Lib/x64/dinput8.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/dinput8.lib -------------------------------------------------------------------------------- /Lib/x64/dsound.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/dsound.lib -------------------------------------------------------------------------------- /Lib/x64/dwrite.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/dwrite.lib -------------------------------------------------------------------------------- /Lib/x64/dxguid.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/dxguid.lib -------------------------------------------------------------------------------- /Lib/x86/D3DCSX.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/D3DCSX.lib -------------------------------------------------------------------------------- /Lib/x86/D3DCSXd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/D3DCSXd.lib -------------------------------------------------------------------------------- /Lib/x86/DxErr.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/DxErr.lib -------------------------------------------------------------------------------- /Lib/x86/XAPOFX.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/XAPOFX.lib -------------------------------------------------------------------------------- /Lib/x86/XInput.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/XInput.lib -------------------------------------------------------------------------------- /Lib/x86/d3d10.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3d10.lib -------------------------------------------------------------------------------- /Lib/x86/d3d10_1.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3d10_1.lib -------------------------------------------------------------------------------- /Lib/x86/d3d11.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3d11.lib -------------------------------------------------------------------------------- /Lib/x86/d3dx10.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dx10.lib -------------------------------------------------------------------------------- /Lib/x86/d3dx10d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dx10d.lib -------------------------------------------------------------------------------- /Lib/x86/d3dx11.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dx11.lib -------------------------------------------------------------------------------- /Lib/x86/d3dx11d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dx11d.lib -------------------------------------------------------------------------------- /Lib/x86/d3dx9.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dx9.lib -------------------------------------------------------------------------------- /Lib/x86/d3dx9d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dx9d.lib -------------------------------------------------------------------------------- /Lib/x86/d3dxof.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dxof.lib -------------------------------------------------------------------------------- /Lib/x86/dinput8.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/dinput8.lib -------------------------------------------------------------------------------- /Lib/x86/dsetup.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/dsetup.lib -------------------------------------------------------------------------------- /Lib/x86/dsound.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/dsound.lib -------------------------------------------------------------------------------- /Lib/x86/dwrite.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/dwrite.lib -------------------------------------------------------------------------------- /Lib/x86/dxguid.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/dxguid.lib -------------------------------------------------------------------------------- /Redist/DSETUP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Redist/DSETUP.dll -------------------------------------------------------------------------------- /Redist/DXSETUP.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Redist/DXSETUP.exe -------------------------------------------------------------------------------- /Redist/dsetup32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Redist/dsetup32.dll -------------------------------------------------------------------------------- /Lib/x64/X3DAudio.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/X3DAudio.lib -------------------------------------------------------------------------------- /Lib/x64/xapobase.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/xapobase.lib -------------------------------------------------------------------------------- /Lib/x64/xapobased.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/xapobased.lib -------------------------------------------------------------------------------- /Lib/x86/X3DAudio.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/X3DAudio.lib -------------------------------------------------------------------------------- /Lib/x86/xapobase.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/xapobase.lib -------------------------------------------------------------------------------- /Lib/x86/xapobased.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/xapobased.lib -------------------------------------------------------------------------------- /Lib/x64/d3dcompiler.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x64/d3dcompiler.lib -------------------------------------------------------------------------------- /Lib/x86/d3dcompiler.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Lib/x86/d3dcompiler.lib -------------------------------------------------------------------------------- /Developer Runtime/x64/D3D10Ref.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3D10Ref.DLL -------------------------------------------------------------------------------- /Developer Runtime/x64/D3D11Ref.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3D11Ref.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/d3dref9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/d3dref9.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/D3D10Ref.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3D10Ref.DLL -------------------------------------------------------------------------------- /Developer Runtime/x86/D3D11Ref.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3D11Ref.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/d3dref9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/d3dref9.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/D3DCSXd_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3DCSXd_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/D3DX10d_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3DX10d_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/D3DX11d_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3DX11d_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/D3DX9d_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3DX9d_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/XAPOFXD1_5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/XAPOFXD1_5.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/XAudioD2_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/XAudioD2_7.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/d3dx9d_33.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/d3dx9d_33.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/D3DCSXd_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3DCSXd_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/D3DX10d_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3DX10d_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/D3DX11d_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3DX11d_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/D3dx9d_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3dx9d_43.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/XAPOFXD1_5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/XAPOFXD1_5.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/XAudioD2_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/XAudioD2_7.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/d3dx9d_33.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/d3dx9d_33.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/X3DAudioD1_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/X3DAudioD1_7.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/X3DAudioD1_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/X3DAudioD1_7.dll -------------------------------------------------------------------------------- /Extras/DirectSound/Debug/x64/dsound.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Extras/DirectSound/Debug/x64/dsound.dll -------------------------------------------------------------------------------- /Extras/DirectSound/Debug/x86/dsound.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Extras/DirectSound/Debug/x86/dsound.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/D3D10SDKLayers.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3D10SDKLayers.DLL -------------------------------------------------------------------------------- /Developer Runtime/x64/D3D11SDKLayers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/D3D11SDKLayers.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/XactEngineA3_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/XactEngineA3_7.dll -------------------------------------------------------------------------------- /Developer Runtime/x64/XactEngineD3_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x64/XactEngineD3_7.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/D3D10SDKLayers.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3D10SDKLayers.DLL -------------------------------------------------------------------------------- /Developer Runtime/x86/D3D11SDKLayers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/D3D11SDKLayers.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/XactEngineA3_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/XactEngineA3_7.dll -------------------------------------------------------------------------------- /Developer Runtime/x86/XactEngineD3_7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarilynDafa/Microsoft-DirectX-SDK-June-2010-/HEAD/Developer Runtime/x86/XactEngineD3_7.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Microsoft-DirectX-SDK-June-2010- 2 | DXSDK 3 | 4 | Developer Runtime
5 | Extras
6 | Include
7 | Lib
8 | Redist
9 | 10 | for XP Game Developer 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /Include/dxsdkver.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * 4 | * File: dxsdkver.h 5 | * Content: DirectX SDK Version Include File 6 | * 7 | ****************************************************************************/ 8 | 9 | #ifndef _DXSDKVER_H_ 10 | #define _DXSDKVER_H_ 11 | 12 | #define _DXSDK_PRODUCT_MAJOR 9 13 | #define _DXSDK_PRODUCT_MINOR 29 14 | #define _DXSDK_BUILD_MAJOR 1962 15 | #define _DXSDK_BUILD_MINOR 0 16 | 17 | #endif // _DXSDKVER_H_ 18 | 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /Include/D3DX10.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx10.h 6 | // Content: D3DX10 utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX10_INTERNAL__ 11 | #error Incorrect D3DX10 header used 12 | #endif 13 | 14 | #ifndef __D3DX10_H__ 15 | #define __D3DX10_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | #include 21 | 22 | #define D3DX10_DEFAULT ((UINT) -1) 23 | #define D3DX10_FROM_FILE ((UINT) -3) 24 | #define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) 25 | 26 | #ifndef D3DX10INLINE 27 | #ifdef _MSC_VER 28 | #if (_MSC_VER >= 1200) 29 | #define D3DX10INLINE __forceinline 30 | #else 31 | #define D3DX10INLINE __inline 32 | #endif 33 | #else 34 | #ifdef __cplusplus 35 | #define D3DX10INLINE inline 36 | #else 37 | #define D3DX10INLINE 38 | #endif 39 | #endif 40 | #endif 41 | 42 | 43 | 44 | // Includes 45 | #include "d3d10.h" 46 | #include "d3dx10.h" 47 | #include "d3dx10math.h" 48 | #include "d3dx10core.h" 49 | #include "d3dx10tex.h" 50 | #include "d3dx10mesh.h" 51 | #include "d3dx10async.h" 52 | 53 | 54 | // Errors 55 | #define _FACDD 0x876 56 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 57 | 58 | enum _D3DX10_ERR { 59 | D3DX10_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), 60 | D3DX10_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), 61 | D3DX10_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), 62 | D3DX10_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), 63 | D3DX10_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), 64 | D3DX10_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), 65 | D3DX10_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), 66 | D3DX10_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), 67 | D3DX10_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), 68 | }; 69 | 70 | 71 | #endif //__D3DX10_H__ 72 | 73 | -------------------------------------------------------------------------------- /Include/D3DX11.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx11.h 6 | // Content: D3DX11 utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX11_INTERNAL__ 11 | #error Incorrect D3DX11 header used 12 | #endif 13 | 14 | #ifndef __D3DX11_H__ 15 | #define __D3DX11_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | #include 21 | 22 | #ifdef ALLOW_THROWING_NEW 23 | #include 24 | #endif 25 | 26 | #define D3DX11_DEFAULT ((UINT) -1) 27 | #define D3DX11_FROM_FILE ((UINT) -3) 28 | #define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) 29 | 30 | #ifndef D3DX11INLINE 31 | #ifdef _MSC_VER 32 | #if (_MSC_VER >= 1200) 33 | #define D3DX11INLINE __forceinline 34 | #else 35 | #define D3DX11INLINE __inline 36 | #endif 37 | #else 38 | #ifdef __cplusplus 39 | #define D3DX11INLINE inline 40 | #else 41 | #define D3DX11INLINE 42 | #endif 43 | #endif 44 | #endif 45 | 46 | 47 | 48 | // Includes 49 | #include "d3d11.h" 50 | #include "d3dx11.h" 51 | #include "d3dx11core.h" 52 | #include "d3dx11tex.h" 53 | #include "d3dx11async.h" 54 | 55 | 56 | // Errors 57 | #define _FACDD 0x876 58 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 59 | 60 | enum _D3DX11_ERR { 61 | D3DX11_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), 62 | D3DX11_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), 63 | D3DX11_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), 64 | D3DX11_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), 65 | D3DX11_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), 66 | D3DX11_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), 67 | D3DX11_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), 68 | D3DX11_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), 69 | D3DX11_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), 70 | }; 71 | 72 | 73 | #endif //__D3DX11_H__ 74 | 75 | -------------------------------------------------------------------------------- /Include/d3dx9.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx9.h 6 | // Content: D3DX utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX_INTERNAL__ 11 | #error Incorrect D3DX header used 12 | #endif 13 | 14 | #ifndef __D3DX9_H__ 15 | #define __D3DX9_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | 21 | #define D3DX_DEFAULT ((UINT) -1) 22 | #define D3DX_DEFAULT_NONPOW2 ((UINT) -2) 23 | #define D3DX_DEFAULT_FLOAT FLT_MAX 24 | #define D3DX_FROM_FILE ((UINT) -3) 25 | #define D3DFMT_FROM_FILE ((D3DFORMAT) -3) 26 | 27 | #ifndef D3DXINLINE 28 | #ifdef _MSC_VER 29 | #if (_MSC_VER >= 1200) 30 | #define D3DXINLINE __forceinline 31 | #else 32 | #define D3DXINLINE __inline 33 | #endif 34 | #else 35 | #ifdef __cplusplus 36 | #define D3DXINLINE inline 37 | #else 38 | #define D3DXINLINE 39 | #endif 40 | #endif 41 | #endif 42 | 43 | 44 | 45 | // Includes 46 | #include "d3d9.h" 47 | #include "d3dx9math.h" 48 | #include "d3dx9core.h" 49 | #include "d3dx9xof.h" 50 | #include "d3dx9mesh.h" 51 | #include "d3dx9shader.h" 52 | #include "d3dx9effect.h" 53 | 54 | #include "d3dx9tex.h" 55 | #include "d3dx9shape.h" 56 | #include "d3dx9anim.h" 57 | 58 | 59 | 60 | // Errors 61 | #define _FACDD 0x876 62 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 63 | 64 | enum _D3DXERR { 65 | D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900), 66 | D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901), 67 | D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902), 68 | D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903), 69 | D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904), 70 | D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905), 71 | D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906), 72 | D3DXERR_DUPLICATENAMEDFRAGMENT = MAKE_DDHRESULT(2907), 73 | D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908), 74 | }; 75 | 76 | 77 | #endif //__D3DX9_H__ 78 | 79 | -------------------------------------------------------------------------------- /Include/Dcommon.h: -------------------------------------------------------------------------------- 1 | //+-------------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // Abstract: 6 | // Public API definitions for DWrite and D2D 7 | // 8 | //---------------------------------------------------------------------------- 9 | 10 | #ifndef DCOMMON_H_INCLUDED 11 | #define DCOMMON_H_INCLUDED 12 | 13 | // 14 | //These macros are defined in the Windows 7 SDK, however to enable development using the technical preview, 15 | //they are included here temporarily. 16 | // 17 | #ifndef DEFINE_ENUM_FLAG_OPERATORS 18 | #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ 19 | extern "C++" { \ 20 | inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) | ((int)b)); } \ 21 | inline ENUMTYPE &operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \ 22 | inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) & ((int)b)); } \ 23 | inline ENUMTYPE &operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \ 24 | inline ENUMTYPE operator ~ (ENUMTYPE a) { return ENUMTYPE(~((int)a)); } \ 25 | inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) ^ ((int)b)); } \ 26 | inline ENUMTYPE &operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ 27 | } 28 | #endif 29 | 30 | #ifndef __field_ecount_opt 31 | #define __field_ecount_opt(x) 32 | #endif 33 | 34 | #ifndef __range 35 | #define __range(x,y) 36 | #endif 37 | 38 | #ifndef __field_ecount 39 | #define __field_ecount(x) 40 | #endif 41 | 42 | /// 43 | /// The measuring method used for text layout. 44 | /// 45 | typedef enum DWRITE_MEASURING_MODE 46 | { 47 | /// 48 | /// Text is measured using glyph ideal metrics whose values are independent to the current display resolution. 49 | /// 50 | DWRITE_MEASURING_MODE_NATURAL, 51 | 52 | /// 53 | /// Text is measured using glyph display compatible metrics whose values tuned for the current display resolution. 54 | /// 55 | DWRITE_MEASURING_MODE_GDI_CLASSIC, 56 | 57 | /// 58 | /// Text is measured using the same glyph display metrics as text measured by GDI using a font 59 | /// created with CLEARTYPE_NATURAL_QUALITY. 60 | /// 61 | DWRITE_MEASURING_MODE_GDI_NATURAL 62 | 63 | } DWRITE_MEASURING_MODE; 64 | 65 | #endif /* DCOMMON_H_INCLUDED */ 66 | -------------------------------------------------------------------------------- /Include/comdecl.h: -------------------------------------------------------------------------------- 1 | // comdecl.h: Macros to facilitate COM interface and GUID declarations. 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | 4 | #ifndef _COMDECL_H_ 5 | #define _COMDECL_H_ 6 | 7 | #ifndef _XBOX 8 | #include // For standard COM interface macros 9 | #else 10 | #pragma warning(push) 11 | #pragma warning(disable:4061) 12 | #include // Required by xobjbase.h 13 | #include // Special definitions for Xbox build 14 | #pragma warning(pop) 15 | #endif 16 | 17 | // The DEFINE_CLSID() and DEFINE_IID() macros defined below allow COM GUIDs to 18 | // be declared and defined in such a way that clients can obtain the GUIDs using 19 | // either the __uuidof() extension or the old-style CLSID_Foo / IID_IFoo names. 20 | // If using the latter approach, the client can also choose whether to get the 21 | // GUID definitions by defining the INITGUID preprocessor constant or by linking 22 | // to a GUID library. This works in either C or C++. 23 | 24 | #ifdef __cplusplus 25 | 26 | #define DECLSPEC_UUID_WRAPPER(x) __declspec(uuid(#x)) 27 | #ifdef INITGUID 28 | 29 | #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 30 | class DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) className; \ 31 | EXTERN_C const GUID DECLSPEC_SELECTANY CLSID_##className = __uuidof(className) 32 | 33 | #define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 34 | interface DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) interfaceName; \ 35 | EXTERN_C const GUID DECLSPEC_SELECTANY IID_##interfaceName = __uuidof(interfaceName) 36 | 37 | #else // INITGUID 38 | 39 | #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 40 | class DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) className; \ 41 | EXTERN_C const GUID CLSID_##className 42 | 43 | #define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 44 | interface DECLSPEC_UUID_WRAPPER(l##-##w1##-##w2##-##b1##b2##-##b3##b4##b5##b6##b7##b8) interfaceName; \ 45 | EXTERN_C const GUID IID_##interfaceName 46 | 47 | #endif // INITGUID 48 | 49 | #else // __cplusplus 50 | 51 | #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 52 | DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) 53 | 54 | #define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 55 | DEFINE_GUID(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) 56 | 57 | #endif // __cplusplus 58 | 59 | #endif // #ifndef _COMDECL_H_ 60 | -------------------------------------------------------------------------------- /Include/DxErr.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * 4 | * File: dxerr.h 5 | * Content: DirectX Error Library Include File 6 | * 7 | ****************************************************************************/ 8 | 9 | #ifndef _DXERR_H_ 10 | #define _DXERR_H_ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif //__cplusplus 15 | 16 | // 17 | // DXGetErrorString 18 | // 19 | // Desc: Converts a DirectX HRESULT to a string 20 | // 21 | // Args: HRESULT hr Can be any error code from 22 | // XACT XAUDIO2 XAPO XINPUT DXGI D3D10 D3DX10 D3D9 D3DX9 DDRAW DSOUND DINPUT DSHOW 23 | // 24 | // Return: Converted string 25 | // 26 | const char* WINAPI DXGetErrorStringA(__in HRESULT hr); 27 | const WCHAR* WINAPI DXGetErrorStringW(__in HRESULT hr); 28 | 29 | #ifdef UNICODE 30 | #define DXGetErrorString DXGetErrorStringW 31 | #else 32 | #define DXGetErrorString DXGetErrorStringA 33 | #endif 34 | 35 | 36 | // 37 | // DXGetErrorDescription 38 | // 39 | // Desc: Returns a string description of a DirectX HRESULT 40 | // 41 | // Args: HRESULT hr Can be any error code from 42 | // XACT XAUDIO2 XAPO XINPUT DXGI D3D10 D3DX10 D3D9 D3DX9 DDRAW DSOUND DINPUT DSHOW 43 | // 44 | // Return: String description 45 | // 46 | const char* WINAPI DXGetErrorDescriptionA(__in HRESULT hr); 47 | const WCHAR* WINAPI DXGetErrorDescriptionW(__in HRESULT hr); 48 | 49 | #ifdef UNICODE 50 | #define DXGetErrorDescription DXGetErrorDescriptionW 51 | #else 52 | #define DXGetErrorDescription DXGetErrorDescriptionA 53 | #endif 54 | 55 | 56 | // 57 | // DXTrace 58 | // 59 | // Desc: Outputs a formatted error message to the debug stream 60 | // 61 | // Args: CHAR* strFile The current file, typically passed in using the 62 | // __FILE__ macro. 63 | // DWORD dwLine The current line number, typically passed in using the 64 | // __LINE__ macro. 65 | // HRESULT hr An HRESULT that will be traced to the debug stream. 66 | // CHAR* strMsg A string that will be traced to the debug stream (may be NULL) 67 | // BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info. 68 | // 69 | // Return: The hr that was passed in. 70 | // 71 | HRESULT WINAPI DXTraceA( __in_z const char* strFile, __in DWORD dwLine, __in HRESULT hr, __in_z_opt const char* strMsg, __in BOOL bPopMsgBox ); 72 | HRESULT WINAPI DXTraceW( __in_z const char* strFile, __in DWORD dwLine, __in HRESULT hr, __in_z_opt const WCHAR* strMsg, __in BOOL bPopMsgBox ); 73 | 74 | #ifdef UNICODE 75 | #define DXTrace DXTraceW 76 | #else 77 | #define DXTrace DXTraceA 78 | #endif 79 | 80 | 81 | // 82 | // Helper macros 83 | // 84 | #if defined(DEBUG) | defined(_DEBUG) 85 | #define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE ) 86 | #define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE ) 87 | #define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE ) 88 | #else 89 | #define DXTRACE_MSG(str) (0L) 90 | #define DXTRACE_ERR(str,hr) (hr) 91 | #define DXTRACE_ERR_MSGBOX(str,hr) (hr) 92 | #endif 93 | 94 | 95 | #ifdef __cplusplus 96 | } 97 | #endif //__cplusplus 98 | 99 | #endif // _DXERR_H_ 100 | -------------------------------------------------------------------------------- /Include/D2DBaseTypes.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // This file is automatically generated. Please do not edit it directly. 5 | // 6 | // File name: D2DBaseTypes.h 7 | //--------------------------------------------------------------------------- 8 | #pragma once 9 | 10 | 11 | #ifndef _D2DBASETYPES_INCLUDED 12 | #define _D2DBASETYPES_INCLUDED 13 | 14 | #ifndef COM_NO_WINDOWS_H 15 | #include 16 | #endif // #ifndef COM_NO_WINDOWS_H 17 | 18 | #ifndef D3DCOLORVALUE_DEFINED 19 | 20 | //+----------------------------------------------------------------------------- 21 | // 22 | // Struct: 23 | // D3DCOLORVALUE 24 | // 25 | //------------------------------------------------------------------------------ 26 | typedef struct D3DCOLORVALUE 27 | { 28 | FLOAT r; 29 | FLOAT g; 30 | FLOAT b; 31 | FLOAT a; 32 | 33 | } D3DCOLORVALUE; 34 | 35 | #define D3DCOLORVALUE_DEFINED 36 | #endif 37 | 38 | 39 | //+----------------------------------------------------------------------------- 40 | // 41 | // Struct: 42 | // D2D_POINT_2U 43 | // 44 | //------------------------------------------------------------------------------ 45 | typedef struct D2D_POINT_2U 46 | { 47 | UINT32 x; 48 | UINT32 y; 49 | 50 | } D2D_POINT_2U; 51 | 52 | 53 | //+----------------------------------------------------------------------------- 54 | // 55 | // Struct: 56 | // D2D_POINT_2F 57 | // 58 | //------------------------------------------------------------------------------ 59 | typedef struct D2D_POINT_2F 60 | { 61 | FLOAT x; 62 | FLOAT y; 63 | 64 | } D2D_POINT_2F; 65 | 66 | 67 | //+----------------------------------------------------------------------------- 68 | // 69 | // Struct: 70 | // D2D_RECT_F 71 | // 72 | //------------------------------------------------------------------------------ 73 | typedef struct D2D_RECT_F 74 | { 75 | FLOAT left; 76 | FLOAT top; 77 | FLOAT right; 78 | FLOAT bottom; 79 | 80 | } D2D_RECT_F; 81 | 82 | 83 | //+----------------------------------------------------------------------------- 84 | // 85 | // Struct: 86 | // D2D_RECT_U 87 | // 88 | //------------------------------------------------------------------------------ 89 | typedef struct D2D_RECT_U 90 | { 91 | UINT32 left; 92 | UINT32 top; 93 | UINT32 right; 94 | UINT32 bottom; 95 | 96 | } D2D_RECT_U; 97 | 98 | 99 | //+----------------------------------------------------------------------------- 100 | // 101 | // Struct: 102 | // D2D_SIZE_F 103 | // 104 | //------------------------------------------------------------------------------ 105 | typedef struct D2D_SIZE_F 106 | { 107 | FLOAT width; 108 | FLOAT height; 109 | 110 | } D2D_SIZE_F; 111 | 112 | 113 | //+----------------------------------------------------------------------------- 114 | // 115 | // Struct: 116 | // D2D_SIZE_U 117 | // 118 | //------------------------------------------------------------------------------ 119 | typedef struct D2D_SIZE_U 120 | { 121 | UINT32 width; 122 | UINT32 height; 123 | 124 | } D2D_SIZE_U; 125 | 126 | typedef D3DCOLORVALUE D2D_COLOR_F; 127 | 128 | //+----------------------------------------------------------------------------- 129 | // 130 | // Struct: 131 | // D2D_MATRIX_3X2_F 132 | // 133 | //------------------------------------------------------------------------------ 134 | typedef struct D2D_MATRIX_3X2_F 135 | { 136 | FLOAT _11; 137 | FLOAT _12; 138 | FLOAT _21; 139 | FLOAT _22; 140 | FLOAT _31; 141 | FLOAT _32; 142 | 143 | } D2D_MATRIX_3X2_F; 144 | 145 | #endif // #ifndef _D2DBASETYPES_INCLUDED 146 | -------------------------------------------------------------------------------- /Include/D3DX11core.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx11core.h 6 | // Content: D3DX11 core types and functions 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx11.h" 11 | 12 | #ifndef __D3DX11CORE_H__ 13 | #define __D3DX11CORE_H__ 14 | 15 | // Current name of the DLL shipped in the same SDK as this header. 16 | 17 | 18 | #define D3DX11_DLL_W L"d3dx11_43.dll" 19 | #define D3DX11_DLL_A "d3dx11_43.dll" 20 | 21 | #ifdef UNICODE 22 | #define D3DX11_DLL D3DX11_DLL_W 23 | #else 24 | #define D3DX11_DLL D3DX11_DLL_A 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif //__cplusplus 30 | 31 | /////////////////////////////////////////////////////////////////////////// 32 | // D3DX11_SDK_VERSION: 33 | // ----------------- 34 | // This identifier is passed to D3DX11CheckVersion in order to ensure that an 35 | // application was built against the correct header files and lib files. 36 | // This number is incremented whenever a header (or other) change would 37 | // require applications to be rebuilt. If the version doesn't match, 38 | // D3DX11CreateVersion will return FALSE. (The number itself has no meaning.) 39 | /////////////////////////////////////////////////////////////////////////// 40 | 41 | 42 | #define D3DX11_SDK_VERSION 43 43 | 44 | 45 | #ifdef D3D_DIAG_DLL 46 | BOOL WINAPI D3DX11DebugMute(BOOL Mute); 47 | #endif 48 | HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif //__cplusplus 53 | 54 | 55 | 56 | ////////////////////////////////////////////////////////////////////////////// 57 | // ID3DX11ThreadPump: 58 | ////////////////////////////////////////////////////////////////////////////// 59 | 60 | #undef INTERFACE 61 | #define INTERFACE ID3DX11DataLoader 62 | 63 | DECLARE_INTERFACE(ID3DX11DataLoader) 64 | { 65 | STDMETHOD(Load)(THIS) PURE; 66 | STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE; 67 | STDMETHOD(Destroy)(THIS) PURE; 68 | }; 69 | 70 | #undef INTERFACE 71 | #define INTERFACE ID3DX11DataProcessor 72 | 73 | DECLARE_INTERFACE(ID3DX11DataProcessor) 74 | { 75 | STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE; 76 | STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE; 77 | STDMETHOD(Destroy)(THIS) PURE; 78 | }; 79 | 80 | // {C93FECFA-6967-478a-ABBC-402D90621FCB} 81 | DEFINE_GUID(IID_ID3DX11ThreadPump, 82 | 0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb); 83 | 84 | #undef INTERFACE 85 | #define INTERFACE ID3DX11ThreadPump 86 | 87 | DECLARE_INTERFACE_(ID3DX11ThreadPump, IUnknown) 88 | { 89 | // IUnknown 90 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 91 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 92 | STDMETHOD_(ULONG, Release)(THIS) PURE; 93 | 94 | // ID3DX11ThreadPump 95 | STDMETHOD(AddWorkItem)(THIS_ ID3DX11DataLoader *pDataLoader, ID3DX11DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE; 96 | STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE; 97 | 98 | STDMETHOD(WaitForAllItems)(THIS) PURE; 99 | STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount); 100 | 101 | STDMETHOD(PurgeAllItems)(THIS) PURE; 102 | STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE; 103 | 104 | }; 105 | 106 | #ifdef __cplusplus 107 | extern "C" { 108 | #endif //__cplusplus 109 | 110 | HRESULT WINAPI D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump **ppThreadPump); 111 | 112 | HRESULT WINAPI D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext *pContext); 113 | 114 | #ifdef __cplusplus 115 | } 116 | #endif //__cplusplus 117 | 118 | /////////////////////////////////////////////////////////////////////////// 119 | 120 | #define _FACD3D 0x876 121 | #define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) 122 | #define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code ) 123 | 124 | #define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156) 125 | #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) 126 | 127 | #endif //__D3DX11CORE_H__ 128 | 129 | -------------------------------------------------------------------------------- /Include/DXGIType.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __dxgitype_h__ 3 | #define __dxgitype_h__ 4 | 5 | 6 | #include "dxgiformat.h" 7 | 8 | #define _FACDXGI 0x87a 9 | #define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code) 10 | #define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code) 11 | 12 | #define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1) 13 | #define DXGI_STATUS_CLIPPED MAKE_DXGI_STATUS(2) 14 | #define DXGI_STATUS_NO_REDIRECTION MAKE_DXGI_STATUS(4) 15 | #define DXGI_STATUS_NO_DESKTOP_ACCESS MAKE_DXGI_STATUS(5) 16 | #define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_STATUS(6) 17 | #define DXGI_STATUS_MODE_CHANGED MAKE_DXGI_STATUS(7) 18 | #define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS MAKE_DXGI_STATUS(8) 19 | 20 | 21 | #define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1) 22 | #define DXGI_ERROR_NOT_FOUND MAKE_DXGI_HRESULT(2) 23 | #define DXGI_ERROR_MORE_DATA MAKE_DXGI_HRESULT(3) 24 | #define DXGI_ERROR_UNSUPPORTED MAKE_DXGI_HRESULT(4) 25 | #define DXGI_ERROR_DEVICE_REMOVED MAKE_DXGI_HRESULT(5) 26 | #define DXGI_ERROR_DEVICE_HUNG MAKE_DXGI_HRESULT(6) 27 | #define DXGI_ERROR_DEVICE_RESET MAKE_DXGI_HRESULT(7) 28 | #define DXGI_ERROR_WAS_STILL_DRAWING MAKE_DXGI_HRESULT(10) 29 | #define DXGI_ERROR_FRAME_STATISTICS_DISJOINT MAKE_DXGI_HRESULT(11) 30 | #define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_HRESULT(12) 31 | #define DXGI_ERROR_DRIVER_INTERNAL_ERROR MAKE_DXGI_HRESULT(32) 32 | #define DXGI_ERROR_NONEXCLUSIVE MAKE_DXGI_HRESULT(33) 33 | #define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE MAKE_DXGI_HRESULT(34) 34 | #define DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED MAKE_DXGI_HRESULT(35) 35 | #define DXGI_ERROR_REMOTE_OUTOFMEMORY MAKE_DXGI_HRESULT(36) 36 | 37 | 38 | 39 | #define DXGI_CPU_ACCESS_NONE ( 0 ) 40 | #define DXGI_CPU_ACCESS_DYNAMIC ( 1 ) 41 | #define DXGI_CPU_ACCESS_READ_WRITE ( 2 ) 42 | #define DXGI_CPU_ACCESS_SCRATCH ( 3 ) 43 | #define DXGI_CPU_ACCESS_FIELD 15 44 | 45 | #define DXGI_USAGE_SHADER_INPUT ( 1L << (0 + 4) ) 46 | #define DXGI_USAGE_RENDER_TARGET_OUTPUT ( 1L << (1 + 4) ) 47 | #define DXGI_USAGE_BACK_BUFFER ( 1L << (2 + 4) ) 48 | #define DXGI_USAGE_SHARED ( 1L << (3 + 4) ) 49 | #define DXGI_USAGE_READ_ONLY ( 1L << (4 + 4) ) 50 | #define DXGI_USAGE_DISCARD_ON_PRESENT ( 1L << (5 + 4) ) 51 | #define DXGI_USAGE_UNORDERED_ACCESS ( 1L << (6 + 4) ) 52 | 53 | typedef struct DXGI_RGB 54 | { 55 | float Red; 56 | float Green; 57 | float Blue; 58 | } DXGI_RGB; 59 | 60 | typedef struct DXGI_GAMMA_CONTROL 61 | { 62 | DXGI_RGB Scale; 63 | DXGI_RGB Offset; 64 | DXGI_RGB GammaCurve[ 1025 ]; 65 | } DXGI_GAMMA_CONTROL; 66 | 67 | typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES 68 | { 69 | BOOL ScaleAndOffsetSupported; 70 | float MaxConvertedValue; 71 | float MinConvertedValue; 72 | UINT NumGammaControlPoints; 73 | float ControlPointPositions[1025]; 74 | } DXGI_GAMMA_CONTROL_CAPABILITIES; 75 | 76 | typedef struct DXGI_RATIONAL 77 | { 78 | UINT Numerator; 79 | UINT Denominator; 80 | } DXGI_RATIONAL; 81 | 82 | typedef enum DXGI_MODE_SCANLINE_ORDER 83 | { 84 | DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, 85 | DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, 86 | DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, 87 | DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3 88 | } DXGI_MODE_SCANLINE_ORDER; 89 | 90 | typedef enum DXGI_MODE_SCALING 91 | { 92 | DXGI_MODE_SCALING_UNSPECIFIED = 0, 93 | DXGI_MODE_SCALING_CENTERED = 1, 94 | DXGI_MODE_SCALING_STRETCHED = 2 95 | } DXGI_MODE_SCALING; 96 | 97 | typedef enum DXGI_MODE_ROTATION 98 | { 99 | DXGI_MODE_ROTATION_UNSPECIFIED = 0, 100 | DXGI_MODE_ROTATION_IDENTITY = 1, 101 | DXGI_MODE_ROTATION_ROTATE90 = 2, 102 | DXGI_MODE_ROTATION_ROTATE180 = 3, 103 | DXGI_MODE_ROTATION_ROTATE270 = 4 104 | } DXGI_MODE_ROTATION; 105 | 106 | typedef struct DXGI_MODE_DESC 107 | { 108 | UINT Width; 109 | UINT Height; 110 | DXGI_RATIONAL RefreshRate; 111 | DXGI_FORMAT Format; 112 | DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; 113 | DXGI_MODE_SCALING Scaling; 114 | } DXGI_MODE_DESC; 115 | 116 | typedef struct DXGI_SAMPLE_DESC 117 | { 118 | UINT Count; 119 | UINT Quality; 120 | } DXGI_SAMPLE_DESC; 121 | 122 | #endif // __dxgitype_h__ 123 | 124 | -------------------------------------------------------------------------------- /Include/d3d10misc.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // File: D3D10Misc.h 6 | // Content: D3D10 Device Creation APIs 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef __D3D10MISC_H__ 11 | #define __D3D10MISC_H__ 12 | 13 | #include "d3d10.h" 14 | 15 | // ID3D10Blob has been made version-neutral and moved to d3dcommon.h. 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif //__cplusplus 20 | 21 | /////////////////////////////////////////////////////////////////////////// 22 | // D3D10_DRIVER_TYPE 23 | // ---------------- 24 | // 25 | // This identifier is used to determine the implementation of Direct3D10 26 | // to be used. 27 | // 28 | // Pass one of these values to D3D10CreateDevice 29 | // 30 | /////////////////////////////////////////////////////////////////////////// 31 | typedef enum D3D10_DRIVER_TYPE 32 | { 33 | D3D10_DRIVER_TYPE_HARDWARE = 0, 34 | D3D10_DRIVER_TYPE_REFERENCE = 1, 35 | D3D10_DRIVER_TYPE_NULL = 2, 36 | D3D10_DRIVER_TYPE_SOFTWARE = 3, 37 | D3D10_DRIVER_TYPE_WARP = 5, 38 | } D3D10_DRIVER_TYPE; 39 | 40 | DEFINE_GUID(GUID_DeviceType, 41 | 0xd722fb4d, 0x7a68, 0x437a, 0xb2, 0x0c, 0x58, 0x04, 0xee, 0x24, 0x94, 0xa6); 42 | 43 | /////////////////////////////////////////////////////////////////////////// 44 | // D3D10CreateDevice 45 | // ------------------ 46 | // 47 | // pAdapter 48 | // If NULL, D3D10CreateDevice will choose the primary adapter and 49 | // create a new instance from a temporarily created IDXGIFactory. 50 | // If non-NULL, D3D10CreateDevice will register the appropriate 51 | // device, if necessary (via IDXGIAdapter::RegisterDrver), before 52 | // creating the device. 53 | // DriverType 54 | // Specifies the driver type to be created: hardware, reference or 55 | // null. 56 | // Software 57 | // HMODULE of a DLL implementing a software rasterizer. Must be NULL for 58 | // non-Software driver types. 59 | // Flags 60 | // Any of those documented for D3D10CreateDevice. 61 | // SDKVersion 62 | // SDK version. Use the D3D10_SDK_VERSION macro. 63 | // ppDevice 64 | // Pointer to returned interface. 65 | // 66 | // Return Values 67 | // Any of those documented for 68 | // CreateDXGIFactory 69 | // IDXGIFactory::EnumAdapters 70 | // IDXGIAdapter::RegisterDriver 71 | // D3D10CreateDevice 72 | // 73 | /////////////////////////////////////////////////////////////////////////// 74 | HRESULT WINAPI D3D10CreateDevice( 75 | IDXGIAdapter *pAdapter, 76 | D3D10_DRIVER_TYPE DriverType, 77 | HMODULE Software, 78 | UINT Flags, 79 | UINT SDKVersion, 80 | ID3D10Device **ppDevice); 81 | 82 | /////////////////////////////////////////////////////////////////////////// 83 | // D3D10CreateDeviceAndSwapChain 84 | // ------------------------------ 85 | // 86 | // ppAdapter 87 | // If NULL, D3D10CreateDevice will choose the primary adapter and 88 | // create a new instance from a temporarily created IDXGIFactory. 89 | // If non-NULL, D3D10CreateDevice will register the appropriate 90 | // device, if necessary (via IDXGIAdapter::RegisterDrver), before 91 | // creating the device. 92 | // DriverType 93 | // Specifies the driver type to be created: hardware, reference or 94 | // null. 95 | // Software 96 | // HMODULE of a DLL implementing a software rasterizer. Must be NULL for 97 | // non-Software driver types. 98 | // Flags 99 | // Any of those documented for D3D10CreateDevice. 100 | // SDKVersion 101 | // SDK version. Use the D3D10_SDK_VERSION macro. 102 | // pSwapChainDesc 103 | // Swap chain description, may be NULL. 104 | // ppSwapChain 105 | // Pointer to returned interface. May be NULL. 106 | // ppDevice 107 | // Pointer to returned interface. 108 | // 109 | // Return Values 110 | // Any of those documented for 111 | // CreateDXGIFactory 112 | // IDXGIFactory::EnumAdapters 113 | // IDXGIAdapter::RegisterDriver 114 | // D3D10CreateDevice 115 | // IDXGIFactory::CreateSwapChain 116 | // 117 | /////////////////////////////////////////////////////////////////////////// 118 | HRESULT WINAPI D3D10CreateDeviceAndSwapChain( 119 | IDXGIAdapter *pAdapter, 120 | D3D10_DRIVER_TYPE DriverType, 121 | HMODULE Software, 122 | UINT Flags, 123 | UINT SDKVersion, 124 | DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, 125 | IDXGISwapChain **ppSwapChain, 126 | ID3D10Device **ppDevice); 127 | 128 | 129 | /////////////////////////////////////////////////////////////////////////// 130 | // D3D10CreateBlob: 131 | // ----------------- 132 | // Creates a Buffer of n Bytes 133 | ////////////////////////////////////////////////////////////////////////// 134 | 135 | HRESULT WINAPI D3D10CreateBlob(SIZE_T NumBytes, LPD3D10BLOB *ppBuffer); 136 | 137 | #ifdef __cplusplus 138 | } 139 | #endif //__cplusplus 140 | 141 | #endif //__D3D10EFFECT_H__ 142 | 143 | 144 | -------------------------------------------------------------------------------- /Include/DXGIFormat.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __dxgiformat_h__ 3 | #define __dxgiformat_h__ 4 | 5 | #define DXGI_FORMAT_DEFINED 1 6 | 7 | typedef enum DXGI_FORMAT 8 | { 9 | DXGI_FORMAT_UNKNOWN = 0, 10 | DXGI_FORMAT_R32G32B32A32_TYPELESS = 1, 11 | DXGI_FORMAT_R32G32B32A32_FLOAT = 2, 12 | DXGI_FORMAT_R32G32B32A32_UINT = 3, 13 | DXGI_FORMAT_R32G32B32A32_SINT = 4, 14 | DXGI_FORMAT_R32G32B32_TYPELESS = 5, 15 | DXGI_FORMAT_R32G32B32_FLOAT = 6, 16 | DXGI_FORMAT_R32G32B32_UINT = 7, 17 | DXGI_FORMAT_R32G32B32_SINT = 8, 18 | DXGI_FORMAT_R16G16B16A16_TYPELESS = 9, 19 | DXGI_FORMAT_R16G16B16A16_FLOAT = 10, 20 | DXGI_FORMAT_R16G16B16A16_UNORM = 11, 21 | DXGI_FORMAT_R16G16B16A16_UINT = 12, 22 | DXGI_FORMAT_R16G16B16A16_SNORM = 13, 23 | DXGI_FORMAT_R16G16B16A16_SINT = 14, 24 | DXGI_FORMAT_R32G32_TYPELESS = 15, 25 | DXGI_FORMAT_R32G32_FLOAT = 16, 26 | DXGI_FORMAT_R32G32_UINT = 17, 27 | DXGI_FORMAT_R32G32_SINT = 18, 28 | DXGI_FORMAT_R32G8X24_TYPELESS = 19, 29 | DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20, 30 | DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21, 31 | DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22, 32 | DXGI_FORMAT_R10G10B10A2_TYPELESS = 23, 33 | DXGI_FORMAT_R10G10B10A2_UNORM = 24, 34 | DXGI_FORMAT_R10G10B10A2_UINT = 25, 35 | DXGI_FORMAT_R11G11B10_FLOAT = 26, 36 | DXGI_FORMAT_R8G8B8A8_TYPELESS = 27, 37 | DXGI_FORMAT_R8G8B8A8_UNORM = 28, 38 | DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29, 39 | DXGI_FORMAT_R8G8B8A8_UINT = 30, 40 | DXGI_FORMAT_R8G8B8A8_SNORM = 31, 41 | DXGI_FORMAT_R8G8B8A8_SINT = 32, 42 | DXGI_FORMAT_R16G16_TYPELESS = 33, 43 | DXGI_FORMAT_R16G16_FLOAT = 34, 44 | DXGI_FORMAT_R16G16_UNORM = 35, 45 | DXGI_FORMAT_R16G16_UINT = 36, 46 | DXGI_FORMAT_R16G16_SNORM = 37, 47 | DXGI_FORMAT_R16G16_SINT = 38, 48 | DXGI_FORMAT_R32_TYPELESS = 39, 49 | DXGI_FORMAT_D32_FLOAT = 40, 50 | DXGI_FORMAT_R32_FLOAT = 41, 51 | DXGI_FORMAT_R32_UINT = 42, 52 | DXGI_FORMAT_R32_SINT = 43, 53 | DXGI_FORMAT_R24G8_TYPELESS = 44, 54 | DXGI_FORMAT_D24_UNORM_S8_UINT = 45, 55 | DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46, 56 | DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47, 57 | DXGI_FORMAT_R8G8_TYPELESS = 48, 58 | DXGI_FORMAT_R8G8_UNORM = 49, 59 | DXGI_FORMAT_R8G8_UINT = 50, 60 | DXGI_FORMAT_R8G8_SNORM = 51, 61 | DXGI_FORMAT_R8G8_SINT = 52, 62 | DXGI_FORMAT_R16_TYPELESS = 53, 63 | DXGI_FORMAT_R16_FLOAT = 54, 64 | DXGI_FORMAT_D16_UNORM = 55, 65 | DXGI_FORMAT_R16_UNORM = 56, 66 | DXGI_FORMAT_R16_UINT = 57, 67 | DXGI_FORMAT_R16_SNORM = 58, 68 | DXGI_FORMAT_R16_SINT = 59, 69 | DXGI_FORMAT_R8_TYPELESS = 60, 70 | DXGI_FORMAT_R8_UNORM = 61, 71 | DXGI_FORMAT_R8_UINT = 62, 72 | DXGI_FORMAT_R8_SNORM = 63, 73 | DXGI_FORMAT_R8_SINT = 64, 74 | DXGI_FORMAT_A8_UNORM = 65, 75 | DXGI_FORMAT_R1_UNORM = 66, 76 | DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67, 77 | DXGI_FORMAT_R8G8_B8G8_UNORM = 68, 78 | DXGI_FORMAT_G8R8_G8B8_UNORM = 69, 79 | DXGI_FORMAT_BC1_TYPELESS = 70, 80 | DXGI_FORMAT_BC1_UNORM = 71, 81 | DXGI_FORMAT_BC1_UNORM_SRGB = 72, 82 | DXGI_FORMAT_BC2_TYPELESS = 73, 83 | DXGI_FORMAT_BC2_UNORM = 74, 84 | DXGI_FORMAT_BC2_UNORM_SRGB = 75, 85 | DXGI_FORMAT_BC3_TYPELESS = 76, 86 | DXGI_FORMAT_BC3_UNORM = 77, 87 | DXGI_FORMAT_BC3_UNORM_SRGB = 78, 88 | DXGI_FORMAT_BC4_TYPELESS = 79, 89 | DXGI_FORMAT_BC4_UNORM = 80, 90 | DXGI_FORMAT_BC4_SNORM = 81, 91 | DXGI_FORMAT_BC5_TYPELESS = 82, 92 | DXGI_FORMAT_BC5_UNORM = 83, 93 | DXGI_FORMAT_BC5_SNORM = 84, 94 | DXGI_FORMAT_B5G6R5_UNORM = 85, 95 | DXGI_FORMAT_B5G5R5A1_UNORM = 86, 96 | DXGI_FORMAT_B8G8R8A8_UNORM = 87, 97 | DXGI_FORMAT_B8G8R8X8_UNORM = 88, 98 | DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89, 99 | DXGI_FORMAT_B8G8R8A8_TYPELESS = 90, 100 | DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91, 101 | DXGI_FORMAT_B8G8R8X8_TYPELESS = 92, 102 | DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93, 103 | DXGI_FORMAT_BC6H_TYPELESS = 94, 104 | DXGI_FORMAT_BC6H_UF16 = 95, 105 | DXGI_FORMAT_BC6H_SF16 = 96, 106 | DXGI_FORMAT_BC7_TYPELESS = 97, 107 | DXGI_FORMAT_BC7_UNORM = 98, 108 | DXGI_FORMAT_BC7_UNORM_SRGB = 99, 109 | DXGI_FORMAT_FORCE_UINT = 0xffffffff 110 | } DXGI_FORMAT; 111 | 112 | #endif // __dxgiformat_h__ 113 | -------------------------------------------------------------------------------- /Include/PIXPlugin.h: -------------------------------------------------------------------------------- 1 | //================================================================================================== 2 | // PIXPlugin.h 3 | // 4 | // Microsoft PIX Plugin Header 5 | // 6 | // Copyright (c) Microsoft Corporation, All rights reserved 7 | //================================================================================================== 8 | 9 | #pragma once 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | 17 | //================================================================================================== 18 | // PIX_PLUGIN_SYSTEM_VERSION - Indicates version of the plugin interface the plugin is built with. 19 | //================================================================================================== 20 | #define PIX_PLUGIN_SYSTEM_VERSION 0x101 21 | 22 | 23 | //================================================================================================== 24 | // PIXCOUNTERID - A unique identifier for each PIX plugin counter. 25 | //================================================================================================== 26 | typedef int PIXCOUNTERID; 27 | 28 | 29 | //================================================================================================== 30 | // PIXCOUNTERDATATYPE - Indicates what type of data the counter produces. 31 | //================================================================================================== 32 | enum PIXCOUNTERDATATYPE 33 | { 34 | PCDT_RESERVED, 35 | PCDT_FLOAT, 36 | PCDT_INT, 37 | PCDT_INT64, 38 | PCDT_STRING, 39 | }; 40 | 41 | 42 | //================================================================================================== 43 | // PIXPLUGININFO - This structure is filled out by PIXGetPluginInfo and passed back to PIX. 44 | //================================================================================================== 45 | struct PIXPLUGININFO 46 | { 47 | // Filled in by caller: 48 | HINSTANCE hinst; 49 | 50 | // Filled in by PIXGetPluginInfo: 51 | WCHAR* pstrPluginName; // Name of plugin 52 | int iPluginVersion; // Version of this particular plugin 53 | int iPluginSystemVersion; // Version of PIX's plugin system this plugin was designed for 54 | }; 55 | 56 | 57 | //================================================================================================== 58 | // PIXCOUNTERINFO - This structure is filled out by PIXGetCounterInfo and passed back to PIX 59 | // to allow PIX to determine information about the counters in the plugin. 60 | //================================================================================================== 61 | struct PIXCOUNTERINFO 62 | { 63 | PIXCOUNTERID counterID; // Used to uniquely ID this counter 64 | WCHAR* pstrName; // String name of the counter 65 | PIXCOUNTERDATATYPE pcdtDataType; // Data type returned by this counter 66 | }; 67 | 68 | 69 | //================================================================================================== 70 | // PIXGetPluginInfo - This returns basic information about this plugin to PIX. 71 | //================================================================================================== 72 | BOOL WINAPI PIXGetPluginInfo( PIXPLUGININFO* pPIXPluginInfo ); 73 | 74 | 75 | //================================================================================================== 76 | // PIXGetCounterInfo - This returns an array of PIXCOUNTERINFO structs to PIX. 77 | // These PIXCOUNTERINFOs allow PIX to enumerate the counters contained 78 | // in this plugin. 79 | //================================================================================================== 80 | BOOL WINAPI PIXGetCounterInfo( DWORD* pdwReturnCounters, PIXCOUNTERINFO** ppCounterInfoList ); 81 | 82 | 83 | //================================================================================================== 84 | // PIXGetCounterDesc - This is called by PIX to request a description of the indicated counter. 85 | //================================================================================================== 86 | BOOL WINAPI PIXGetCounterDesc( PIXCOUNTERID id, WCHAR** ppstrCounterDesc ); 87 | 88 | 89 | //================================================================================================== 90 | // PIXBeginExperiment - This called by PIX once per counter when instrumentation starts. 91 | //================================================================================================== 92 | BOOL WINAPI PIXBeginExperiment( PIXCOUNTERID id, const WCHAR* pstrApplication ); 93 | 94 | 95 | //================================================================================================== 96 | // PIXEndFrame - This is called by PIX once per counter at the end of each frame to gather the 97 | // counter value for that frame. Note that the pointer to the return data must 98 | // continue to point to valid counter data until the next call to PIXEndFrame (or 99 | // PIXEndExperiment) for the same counter. So do not set *ppReturnData to the same 100 | // pointer for multiple counters, or point to a local variable that will go out of 101 | // scope. See the sample PIX plugin for an example of how to structure a plugin 102 | // properly. 103 | //================================================================================================== 104 | BOOL WINAPI PIXEndFrame( PIXCOUNTERID id, UINT iFrame, DWORD* pdwReturnBytes, BYTE** ppReturnData ); 105 | 106 | 107 | //================================================================================================== 108 | // PIXEndExperiment - This is called by PIX once per counter when instrumentation ends. 109 | //================================================================================================== 110 | BOOL WINAPI PIXEndExperiment( PIXCOUNTERID id ); 111 | 112 | 113 | #ifdef __cplusplus 114 | }; 115 | #endif 116 | 117 | //================================================================================================== 118 | // eof: PIXPlugin.h 119 | //================================================================================================== 120 | 121 | -------------------------------------------------------------------------------- /Include/D2Derr.h: -------------------------------------------------------------------------------- 1 | /*=========================================================================*\ 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | \*=========================================================================*/ 6 | 7 | #pragma once 8 | 9 | /*=========================================================================*\ 10 | D2D Status Codes 11 | \*=========================================================================*/ 12 | 13 | #define FACILITY_D2D 0x899 14 | 15 | #define MAKE_D2DHR( sev, code )\ 16 | MAKE_HRESULT( sev, FACILITY_D2D, (code) ) 17 | 18 | #define MAKE_D2DHR_ERR( code )\ 19 | MAKE_D2DHR( 1, code ) 20 | 21 | 22 | //+---------------------------------------------------------------------------- 23 | // 24 | // D2D error codes 25 | // 26 | //------------------------------------------------------------------------------ 27 | 28 | // 29 | // Error codes shared with WINCODECS 30 | // 31 | 32 | // 33 | // The pixel format is not supported. 34 | // 35 | #define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 36 | 37 | // 38 | // Error codes that were already returned in prior versions and were part of the 39 | // MIL facility. 40 | 41 | // 42 | // Error codes mapped from WIN32 where there isn't already another HRESULT based 43 | // define 44 | // 45 | 46 | // 47 | // The supplied buffer was too small to accomodate the data. 48 | // 49 | #define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) 50 | 51 | 52 | // 53 | // D2D specific codes 54 | // 55 | 56 | // 57 | // The object was not in the correct state to process the method. 58 | // 59 | #define D2DERR_WRONG_STATE MAKE_D2DHR_ERR(0x001) 60 | 61 | // 62 | // The object has not yet been initialized. 63 | // 64 | #define D2DERR_NOT_INITIALIZED MAKE_D2DHR_ERR(0x002) 65 | 66 | // 67 | // The requested opertion is not supported. 68 | // 69 | #define D2DERR_UNSUPPORTED_OPERATION MAKE_D2DHR_ERR(0x003) 70 | 71 | // 72 | // The geomery scanner failed to process the data. 73 | // 74 | #define D2DERR_SCANNER_FAILED MAKE_D2DHR_ERR(0x004) 75 | 76 | // 77 | // D2D could not access the screen. 78 | // 79 | #define D2DERR_SCREEN_ACCESS_DENIED MAKE_D2DHR_ERR(0x005) 80 | 81 | // 82 | // A valid display state could not be determined. 83 | // 84 | #define D2DERR_DISPLAY_STATE_INVALID MAKE_D2DHR_ERR(0x006) 85 | 86 | // 87 | // The supplied vector is vero. 88 | // 89 | #define D2DERR_ZERO_VECTOR MAKE_D2DHR_ERR(0x007) 90 | 91 | // 92 | // An internal error (D2D bug) occurred. On checked builds, we would assert. 93 | // 94 | // The application should close this instance of D2D and should consider 95 | // restarting its process. 96 | // 97 | #define D2DERR_INTERNAL_ERROR MAKE_D2DHR_ERR(0x008) 98 | 99 | // 100 | // The display format we need to render is not supported by the 101 | // hardware device. 102 | // 103 | #define D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED MAKE_D2DHR_ERR(0x009) 104 | 105 | // 106 | // A call to this method is invalid. 107 | // 108 | #define D2DERR_INVALID_CALL MAKE_D2DHR_ERR(0x00A) 109 | 110 | // 111 | // No HW rendering device is available for this operation. 112 | // 113 | #define D2DERR_NO_HARDWARE_DEVICE MAKE_D2DHR_ERR(0x00B) 114 | 115 | // 116 | // There has been a presentation error that may be recoverable. The caller 117 | // needs to recreate, rerender the entire frame, and reattempt present. 118 | // 119 | #define D2DERR_RECREATE_TARGET MAKE_D2DHR_ERR(0x00C) 120 | 121 | // 122 | // Shader construction failed because it was too complex. 123 | // 124 | #define D2DERR_TOO_MANY_SHADER_ELEMENTS MAKE_D2DHR_ERR(0x00D) 125 | 126 | // 127 | // Shader compilation failed. 128 | // 129 | #define D2DERR_SHADER_COMPILE_FAILED MAKE_D2DHR_ERR(0x00E) 130 | 131 | // 132 | // Requested DX surface size exceeded maximum texture size. 133 | // 134 | #define D2DERR_MAX_TEXTURE_SIZE_EXCEEDED MAKE_D2DHR_ERR(0x00F) 135 | 136 | // 137 | // The requested D2D version is not supported. 138 | // 139 | #define D2DERR_UNSUPPORTED_VERSION MAKE_D2DHR_ERR(0x010) 140 | 141 | // 142 | // Invalid number. 143 | // 144 | #define D2DERR_BAD_NUMBER MAKE_D2DHR_ERR(0x0011) 145 | 146 | // 147 | // Objects used together must be created from the same factory instance. 148 | // 149 | #define D2DERR_WRONG_FACTORY MAKE_D2DHR_ERR(0x012) 150 | 151 | // 152 | // A layer resource can only be in use once at any point in time. 153 | // 154 | #define D2DERR_LAYER_ALREADY_IN_USE MAKE_D2DHR_ERR(0x013) 155 | 156 | // 157 | // The pop call did not match the corresponding push call 158 | // 159 | #define D2DERR_POP_CALL_DID_NOT_MATCH_PUSH MAKE_D2DHR_ERR(0x014) 160 | 161 | // 162 | // The resource was realized on the wrong render target 163 | // 164 | #define D2DERR_WRONG_RESOURCE_DOMAIN MAKE_D2DHR_ERR(0x015) 165 | 166 | // 167 | // The push and pop calls were unbalanced 168 | // 169 | #define D2DERR_PUSH_POP_UNBALANCED MAKE_D2DHR_ERR(0x016) 170 | 171 | // 172 | // Attempt to copy from a render target while a layer or clip rect is applied 173 | // 174 | #define D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT MAKE_D2DHR_ERR(0x017) 175 | 176 | // 177 | // The brush types are incompatible for the call. 178 | // 179 | #define D2DERR_INCOMPATIBLE_BRUSH_TYPES MAKE_D2DHR_ERR(0x018) 180 | 181 | // 182 | // An unknown win32 failure occurred. 183 | // 184 | #define D2DERR_WIN32_ERROR MAKE_D2DHR_ERR(0x019) 185 | 186 | // 187 | // The render target is not compatible with GDI 188 | // 189 | #define D2DERR_TARGET_NOT_GDI_COMPATIBLE MAKE_D2DHR_ERR(0x01A) 190 | 191 | // 192 | // A text client drawing effect object is of the wrong type 193 | // 194 | #define D2DERR_TEXT_EFFECT_IS_WRONG_TYPE MAKE_D2DHR_ERR(0x01B) 195 | 196 | // 197 | // The application is holding a reference to the IDWriteTextRenderer interface 198 | // after the corresponding DrawText or DrawTextLayout call has returned. The 199 | // IDWriteTextRenderer instance will be zombied. 200 | // 201 | #define D2DERR_TEXT_RENDERER_NOT_RELEASED MAKE_D2DHR_ERR(0x01C) 202 | 203 | // 204 | // The requested size is larger than the guaranteed supported texture size. 205 | // 206 | #define D2DERR_EXCEEDS_MAX_BITMAP_SIZE MAKE_D2DHR_ERR(0x01D) 207 | -------------------------------------------------------------------------------- /Include/XAPOFX.h: -------------------------------------------------------------------------------- 1 | /*-========================================================================-_ 2 | | - XAPOFX - | 3 | | Copyright (c) Microsoft Corporation. All rights reserved. | 4 | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 5 | |PROJECT: XAPOFX MODEL: Unmanaged User-mode | 6 | |VERSION: 1.3 EXCEPT: No Exceptions | 7 | |CLASS: N / A MINREQ: WinXP, Xbox360 | 8 | |BASE: N / A DIALECT: MSC++ 14.00 | 9 | |>------------------------------------------------------------------------<| 10 | | DUTY: Cross-platform Audio Processing Objects | 11 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 12 | NOTES: 13 | 1. USE THE DEBUG DLL TO ENABLE PARAMETER VALIDATION VIA ASSERTS! 14 | Here's how: 15 | Copy XAPOFXDX_X.dll to where your application exists. 16 | The debug DLL can be found under %WINDIR%\system32. 17 | Rename XAPOFXDX_X.dll to XAPOFXX_X.dll to use the debug version. */ 18 | 19 | #pragma once 20 | //---------------------------------------------------// 21 | #include "comdecl.h" // for DEFINE_CLSID 22 | 23 | // FX class IDs 24 | DEFINE_CLSID(FXEQ, A90BC001, E897, E897, 74, 39, 43, 55, 00, 00, 00, 00); 25 | DEFINE_CLSID(FXMasteringLimiter, A90BC001, E897, E897, 74, 39, 43, 55, 00, 00, 00, 01); 26 | DEFINE_CLSID(FXReverb, A90BC001, E897, E897, 74, 39, 43, 55, 00, 00, 00, 02); 27 | DEFINE_CLSID(FXEcho, A90BC001, E897, E897, 74, 39, 43, 55, 00, 00, 00, 03); 28 | 29 | 30 | #if !defined(GUID_DEFS_ONLY) // ignore rest if only GUID definitions requested 31 | #if defined(_XBOX) // general windows and COM declarations 32 | #include 33 | #include 34 | #else 35 | #include 36 | #include 37 | #endif 38 | #include // float bounds 39 | 40 | 41 | // EQ parameter bounds (inclusive), used with XEQ: 42 | #define FXEQ_MIN_FRAMERATE 22000 43 | #define FXEQ_MAX_FRAMERATE 48000 44 | 45 | #define FXEQ_MIN_FREQUENCY_CENTER 20.0f 46 | #define FXEQ_MAX_FREQUENCY_CENTER 20000.0f 47 | #define FXEQ_DEFAULT_FREQUENCY_CENTER_0 100.0f // band 0 48 | #define FXEQ_DEFAULT_FREQUENCY_CENTER_1 800.0f // band 1 49 | #define FXEQ_DEFAULT_FREQUENCY_CENTER_2 2000.0f // band 2 50 | #define FXEQ_DEFAULT_FREQUENCY_CENTER_3 10000.0f // band 3 51 | 52 | #define FXEQ_MIN_GAIN 0.126f // -18dB 53 | #define FXEQ_MAX_GAIN 7.94f // +18dB 54 | #define FXEQ_DEFAULT_GAIN 1.0f // 0dB change, all bands 55 | 56 | #define FXEQ_MIN_BANDWIDTH 0.1f 57 | #define FXEQ_MAX_BANDWIDTH 2.0f 58 | #define FXEQ_DEFAULT_BANDWIDTH 1.0f // all bands 59 | 60 | 61 | // Mastering limiter parameter bounds (inclusive), used with XMasteringLimiter: 62 | #define FXMASTERINGLIMITER_MIN_RELEASE 1 63 | #define FXMASTERINGLIMITER_MAX_RELEASE 20 64 | #define FXMASTERINGLIMITER_DEFAULT_RELEASE 6 65 | 66 | #define FXMASTERINGLIMITER_MIN_LOUDNESS 1 67 | #define FXMASTERINGLIMITER_MAX_LOUDNESS 1800 68 | #define FXMASTERINGLIMITER_DEFAULT_LOUDNESS 1000 69 | 70 | 71 | // Reverb parameter bounds (inclusive), used with XReverb: 72 | #define FXREVERB_MIN_DIFFUSION 0.0f 73 | #define FXREVERB_MAX_DIFFUSION 1.0f 74 | #define FXREVERB_DEFAULT_DIFFUSION 0.9f 75 | 76 | #define FXREVERB_MIN_ROOMSIZE 0.0001f 77 | #define FXREVERB_MAX_ROOMSIZE 1.0f 78 | #define FXREVERB_DEFAULT_ROOMSIZE 0.6f 79 | 80 | 81 | // Echo parameter bounds (inclusive), used with XEcho: 82 | #define FXECHO_MIN_WETDRYMIX 0.0f 83 | #define FXECHO_MAX_WETDRYMIX 1.0f 84 | #define FXECHO_DEFAULT_WETDRYMIX 0.5f 85 | 86 | #define FXECHO_MIN_FEEDBACK 0.0f 87 | #define FXECHO_MAX_FEEDBACK 1.0f 88 | #define FXECHO_DEFAULT_FEEDBACK 0.5f 89 | 90 | #define FXECHO_MIN_DELAY 1.0f 91 | #define FXECHO_MAX_DELAY 2000.0f 92 | #define FXECHO_DEFAULT_DELAY 500.0f 93 | 94 | 95 | //-----------------------------------------------------// 96 | #pragma pack(push, 1) // set packing alignment to ensure consistency across arbitrary build environments 97 | 98 | 99 | // EQ parameters (4 bands), used with IXAPOParameters::SetParameters: 100 | // The EQ supports only FLOAT32 audio foramts. 101 | // The framerate must be within [22000, 48000] Hz. 102 | typedef struct FXEQ_PARAMETERS { 103 | float FrequencyCenter0; // center frequency in Hz, band 0 104 | float Gain0; // boost/cut 105 | float Bandwidth0; // bandwidth, region of EQ is center frequency +/- bandwidth/2 106 | float FrequencyCenter1; // band 1 107 | float Gain1; 108 | float Bandwidth1; 109 | float FrequencyCenter2; // band 2 110 | float Gain2; 111 | float Bandwidth2; 112 | float FrequencyCenter3; // band 3 113 | float Gain3; 114 | float Bandwidth3; 115 | } FXEQ_PARAMETERS; 116 | 117 | 118 | // Mastering limiter parameters, used with IXAPOParameters::SetParameters: 119 | // The mastering limiter supports only FLOAT32 audio formats. 120 | typedef struct FXMASTERINGLIMITER_PARAMETERS { 121 | UINT32 Release; // release time (tuning factor with no specific units) 122 | UINT32 Loudness; // loudness target (threshold) 123 | } FXMASTERINGLIMITER_PARAMETERS; 124 | 125 | 126 | // Reverb parameters, used with IXAPOParameters::SetParameters: 127 | // The reverb supports only FLOAT32 audio formats with the following 128 | // channel configurations: 129 | // Input: Mono Output: Mono 130 | // Input: Stereo Output: Stereo 131 | typedef struct FXREVERB_PARAMETERS { 132 | float Diffusion; // diffusion 133 | float RoomSize; // room size 134 | } FXREVERB_PARAMETERS; 135 | 136 | 137 | // Echo parameters, used with IXAPOParameters::SetParameters: 138 | // The echo supports only FLOAT32 audio formats. 139 | typedef struct FXECHO_PARAMETERS { 140 | float WetDryMix; // ratio of wet (processed) signal to dry (original) signal 141 | float Feedback; // amount of output fed back into input 142 | float Delay; // delay (all channels) in milliseconds 143 | } FXECHO_PARAMETERS; 144 | 145 | 146 | //-------------------------------------------------------------// 147 | // function storage-class attribute and calltype 148 | #if defined(_XBOX) || !defined(FXDLL) 149 | #define FX_API_(type) EXTERN_C type STDAPIVCALLTYPE 150 | #else 151 | #if defined(FXEXPORT) 152 | #define FX_API_(type) EXTERN_C __declspec(dllexport) type STDAPIVCALLTYPE 153 | #else 154 | #define FX_API_(type) EXTERN_C __declspec(dllimport) type STDAPIVCALLTYPE 155 | #endif 156 | #endif 157 | #define FX_IMP_(type) type STDMETHODVCALLTYPE 158 | 159 | 160 | //-------------------------------------------------------// 161 | // creates instance of requested XAPO, use Release to free instance 162 | FX_API_(HRESULT) CreateFX (REFCLSID clsid, __deref_out IUnknown** pEffect); 163 | 164 | 165 | #pragma pack(pop) // revert packing alignment 166 | #endif // !defined(GUID_DEFS_ONLY) 167 | //---------------------------------<-EOF->----------------------------------// 168 | -------------------------------------------------------------------------------- /Include/d3dx9shape.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx9shapes.h 6 | // Content: D3DX simple shapes 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx9.h" 11 | 12 | #ifndef __D3DX9SHAPES_H__ 13 | #define __D3DX9SHAPES_H__ 14 | 15 | /////////////////////////////////////////////////////////////////////////// 16 | // Functions: 17 | /////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif //__cplusplus 22 | 23 | 24 | //------------------------------------------------------------------------- 25 | // D3DXCreatePolygon: 26 | // ------------------ 27 | // Creates a mesh containing an n-sided polygon. The polygon is centered 28 | // at the origin. 29 | // 30 | // Parameters: 31 | // 32 | // pDevice The D3D device with which the mesh is going to be used. 33 | // Length Length of each side. 34 | // Sides Number of sides the polygon has. (Must be >= 3) 35 | // ppMesh The mesh object which will be created 36 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 37 | //------------------------------------------------------------------------- 38 | HRESULT WINAPI 39 | D3DXCreatePolygon( 40 | LPDIRECT3DDEVICE9 pDevice, 41 | FLOAT Length, 42 | UINT Sides, 43 | LPD3DXMESH* ppMesh, 44 | LPD3DXBUFFER* ppAdjacency); 45 | 46 | 47 | //------------------------------------------------------------------------- 48 | // D3DXCreateBox: 49 | // -------------- 50 | // Creates a mesh containing an axis-aligned box. The box is centered at 51 | // the origin. 52 | // 53 | // Parameters: 54 | // 55 | // pDevice The D3D device with which the mesh is going to be used. 56 | // Width Width of box (along X-axis) 57 | // Height Height of box (along Y-axis) 58 | // Depth Depth of box (along Z-axis) 59 | // ppMesh The mesh object which will be created 60 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 61 | //------------------------------------------------------------------------- 62 | HRESULT WINAPI 63 | D3DXCreateBox( 64 | LPDIRECT3DDEVICE9 pDevice, 65 | FLOAT Width, 66 | FLOAT Height, 67 | FLOAT Depth, 68 | LPD3DXMESH* ppMesh, 69 | LPD3DXBUFFER* ppAdjacency); 70 | 71 | 72 | //------------------------------------------------------------------------- 73 | // D3DXCreateCylinder: 74 | // ------------------- 75 | // Creates a mesh containing a cylinder. The generated cylinder is 76 | // centered at the origin, and its axis is aligned with the Z-axis. 77 | // 78 | // Parameters: 79 | // 80 | // pDevice The D3D device with which the mesh is going to be used. 81 | // Radius1 Radius at -Z end (should be >= 0.0f) 82 | // Radius2 Radius at +Z end (should be >= 0.0f) 83 | // Length Length of cylinder (along Z-axis) 84 | // Slices Number of slices about the main axis 85 | // Stacks Number of stacks along the main axis 86 | // ppMesh The mesh object which will be created 87 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 88 | //------------------------------------------------------------------------- 89 | HRESULT WINAPI 90 | D3DXCreateCylinder( 91 | LPDIRECT3DDEVICE9 pDevice, 92 | FLOAT Radius1, 93 | FLOAT Radius2, 94 | FLOAT Length, 95 | UINT Slices, 96 | UINT Stacks, 97 | LPD3DXMESH* ppMesh, 98 | LPD3DXBUFFER* ppAdjacency); 99 | 100 | 101 | //------------------------------------------------------------------------- 102 | // D3DXCreateSphere: 103 | // ----------------- 104 | // Creates a mesh containing a sphere. The sphere is centered at the 105 | // origin. 106 | // 107 | // Parameters: 108 | // 109 | // pDevice The D3D device with which the mesh is going to be used. 110 | // Radius Radius of the sphere (should be >= 0.0f) 111 | // Slices Number of slices about the main axis 112 | // Stacks Number of stacks along the main axis 113 | // ppMesh The mesh object which will be created 114 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 115 | //------------------------------------------------------------------------- 116 | HRESULT WINAPI 117 | D3DXCreateSphere( 118 | LPDIRECT3DDEVICE9 pDevice, 119 | FLOAT Radius, 120 | UINT Slices, 121 | UINT Stacks, 122 | LPD3DXMESH* ppMesh, 123 | LPD3DXBUFFER* ppAdjacency); 124 | 125 | 126 | //------------------------------------------------------------------------- 127 | // D3DXCreateTorus: 128 | // ---------------- 129 | // Creates a mesh containing a torus. The generated torus is centered at 130 | // the origin, and its axis is aligned with the Z-axis. 131 | // 132 | // Parameters: 133 | // 134 | // pDevice The D3D device with which the mesh is going to be used. 135 | // InnerRadius Inner radius of the torus (should be >= 0.0f) 136 | // OuterRadius Outer radius of the torue (should be >= 0.0f) 137 | // Sides Number of sides in a cross-section (must be >= 3) 138 | // Rings Number of rings making up the torus (must be >= 3) 139 | // ppMesh The mesh object which will be created 140 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 141 | //------------------------------------------------------------------------- 142 | HRESULT WINAPI 143 | D3DXCreateTorus( 144 | LPDIRECT3DDEVICE9 pDevice, 145 | FLOAT InnerRadius, 146 | FLOAT OuterRadius, 147 | UINT Sides, 148 | UINT Rings, 149 | LPD3DXMESH* ppMesh, 150 | LPD3DXBUFFER* ppAdjacency); 151 | 152 | 153 | //------------------------------------------------------------------------- 154 | // D3DXCreateTeapot: 155 | // ----------------- 156 | // Creates a mesh containing a teapot. 157 | // 158 | // Parameters: 159 | // 160 | // pDevice The D3D device with which the mesh is going to be used. 161 | // ppMesh The mesh object which will be created 162 | // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. 163 | //------------------------------------------------------------------------- 164 | HRESULT WINAPI 165 | D3DXCreateTeapot( 166 | LPDIRECT3DDEVICE9 pDevice, 167 | LPD3DXMESH* ppMesh, 168 | LPD3DXBUFFER* ppAdjacency); 169 | 170 | 171 | //------------------------------------------------------------------------- 172 | // D3DXCreateText: 173 | // --------------- 174 | // Creates a mesh containing the specified text using the font associated 175 | // with the device context. 176 | // 177 | // Parameters: 178 | // 179 | // pDevice The D3D device with which the mesh is going to be used. 180 | // hDC Device context, with desired font selected 181 | // pText Text to generate 182 | // Deviation Maximum chordal deviation from true font outlines 183 | // Extrusion Amount to extrude text in -Z direction 184 | // ppMesh The mesh object which will be created 185 | // pGlyphMetrics Address of buffer to receive glyph metric data (or NULL) 186 | //------------------------------------------------------------------------- 187 | HRESULT WINAPI 188 | D3DXCreateTextA( 189 | LPDIRECT3DDEVICE9 pDevice, 190 | HDC hDC, 191 | LPCSTR pText, 192 | FLOAT Deviation, 193 | FLOAT Extrusion, 194 | LPD3DXMESH* ppMesh, 195 | LPD3DXBUFFER* ppAdjacency, 196 | LPGLYPHMETRICSFLOAT pGlyphMetrics); 197 | 198 | HRESULT WINAPI 199 | D3DXCreateTextW( 200 | LPDIRECT3DDEVICE9 pDevice, 201 | HDC hDC, 202 | LPCWSTR pText, 203 | FLOAT Deviation, 204 | FLOAT Extrusion, 205 | LPD3DXMESH* ppMesh, 206 | LPD3DXBUFFER* ppAdjacency, 207 | LPGLYPHMETRICSFLOAT pGlyphMetrics); 208 | 209 | #ifdef UNICODE 210 | #define D3DXCreateText D3DXCreateTextW 211 | #else 212 | #define D3DXCreateText D3DXCreateTextA 213 | #endif 214 | 215 | 216 | #ifdef __cplusplus 217 | } 218 | #endif //__cplusplus 219 | 220 | #endif //__D3DX9SHAPES_H__ 221 | 222 | -------------------------------------------------------------------------------- /Include/dxdiag.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: dxdiag.h 6 | * Content: DirectX Diagnostic Tool include file 7 | * 8 | ****************************************************************************/ 9 | 10 | #ifndef _DXDIAG_H_ 11 | #define _DXDIAG_H_ 12 | 13 | #include // for DECLARE_INTERFACE_ and HRESULT 14 | 15 | // This identifier is passed to IDxDiagProvider::Initialize in order to ensure that an 16 | // application was built against the correct header files. This number is 17 | // incremented whenever a header (or other) change would require applications 18 | // to be rebuilt. If the version doesn't match, IDxDiagProvider::Initialize will fail. 19 | // (The number itself has no meaning.) 20 | #define DXDIAG_DX9_SDK_VERSION 111 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | 27 | /**************************************************************************** 28 | * 29 | * DxDiag Errors 30 | * 31 | ****************************************************************************/ 32 | #define DXDIAG_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) 33 | 34 | 35 | /**************************************************************************** 36 | * 37 | * DxDiag CLSIDs 38 | * 39 | ****************************************************************************/ 40 | 41 | // {A65B8071-3BFE-4213-9A5B-491DA4461CA7} 42 | DEFINE_GUID(CLSID_DxDiagProvider, 43 | 0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7); 44 | 45 | 46 | /**************************************************************************** 47 | * 48 | * DxDiag Interface IIDs 49 | * 50 | ****************************************************************************/ 51 | 52 | // {9C6B4CB0-23F8-49CC-A3ED-45A55000A6D2} 53 | DEFINE_GUID(IID_IDxDiagProvider, 54 | 0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2); 55 | 56 | // {0x7D0F462F-0x4064-0x4862-BC7F-933E5058C10F} 57 | DEFINE_GUID(IID_IDxDiagContainer, 58 | 0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F); 59 | 60 | 61 | /**************************************************************************** 62 | * 63 | * DxDiag Interface Pointer definitions 64 | * 65 | ****************************************************************************/ 66 | 67 | typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER; 68 | 69 | typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER; 70 | 71 | 72 | /**************************************************************************** 73 | * 74 | * DxDiag Structures 75 | * 76 | ****************************************************************************/ 77 | 78 | typedef struct _DXDIAG_INIT_PARAMS 79 | { 80 | DWORD dwSize; // Size of this structure. 81 | DWORD dwDxDiagHeaderVersion; // Pass in DXDIAG_DX9_SDK_VERSION. This verifies 82 | // the header and dll are correctly matched. 83 | BOOL bAllowWHQLChecks; // If true, allow dxdiag to check if drivers are 84 | // digital signed as logo'd by WHQL which may 85 | // connect via internet to update WHQL certificates. 86 | VOID* pReserved; // Reserved. Must be NULL. 87 | } DXDIAG_INIT_PARAMS; 88 | 89 | 90 | /**************************************************************************** 91 | * 92 | * DxDiag Application Interfaces 93 | * 94 | ****************************************************************************/ 95 | 96 | // 97 | // COM definition for IDxDiagProvider 98 | // 99 | #undef INTERFACE // External COM Implementation 100 | #define INTERFACE IDxDiagProvider 101 | DECLARE_INTERFACE_(IDxDiagProvider,IUnknown) 102 | { 103 | /*** IUnknown methods ***/ 104 | STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; 105 | STDMETHOD_(ULONG,AddRef) (THIS) PURE; 106 | STDMETHOD_(ULONG,Release) (THIS) PURE; 107 | 108 | /*** IDxDiagProvider methods ***/ 109 | STDMETHOD(Initialize) (THIS_ DXDIAG_INIT_PARAMS* pParams) PURE; 110 | STDMETHOD(GetRootContainer) (THIS_ IDxDiagContainer **ppInstance) PURE; 111 | }; 112 | 113 | 114 | // 115 | // COM definition for IDxDiagContainer 116 | // 117 | #undef INTERFACE // External COM Implementation 118 | #define INTERFACE IDxDiagContainer 119 | DECLARE_INTERFACE_(IDxDiagContainer,IUnknown) 120 | { 121 | /*** IUnknown methods ***/ 122 | STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; 123 | STDMETHOD_(ULONG,AddRef) (THIS) PURE; 124 | STDMETHOD_(ULONG,Release) (THIS) PURE; 125 | 126 | /*** IDxDiagContainer methods ***/ 127 | STDMETHOD(GetNumberOfChildContainers) (THIS_ DWORD *pdwCount) PURE; 128 | STDMETHOD(EnumChildContainerNames) (THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE; 129 | STDMETHOD(GetChildContainer) (THIS_ LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) PURE; 130 | STDMETHOD(GetNumberOfProps) (THIS_ DWORD *pdwCount) PURE; 131 | STDMETHOD(EnumPropNames) (THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE; 132 | STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE; 133 | }; 134 | 135 | 136 | /**************************************************************************** 137 | * 138 | * DxDiag application interface macros 139 | * 140 | ****************************************************************************/ 141 | 142 | #if !defined(__cplusplus) || defined(CINTERFACE) 143 | 144 | #define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 145 | #define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p) 146 | #define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p) 147 | #define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) 148 | #define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a) 149 | 150 | #define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 151 | #define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p) 152 | #define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p) 153 | #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a) 154 | #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c) 155 | #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b) 156 | #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a) 157 | #define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c) 158 | #define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b) 159 | 160 | #else /* C++ */ 161 | 162 | #define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b) 163 | #define IDxDiagProvider_AddRef(p) (p)->AddRef(p) 164 | #define IDxDiagProvider_Release(p) (p)->Release(p) 165 | #define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(p,a,b) 166 | #define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(p,a) 167 | 168 | #define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b) 169 | #define IDxDiagContainer_AddRef(p) (p)->AddRef(p) 170 | #define IDxDiagContainer_Release(p) (p)->Release(p) 171 | #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(p,a) 172 | #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(p,a,b,c) 173 | #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(p,a,b) 174 | #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(p,a) 175 | #define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(p,a,b,c) 176 | #define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(p,a,b) 177 | 178 | #endif 179 | 180 | 181 | #ifdef __cplusplus 182 | } 183 | #endif 184 | 185 | #endif /* _DXDIAG_H_ */ 186 | 187 | 188 | -------------------------------------------------------------------------------- /Include/dxfile.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: dxfile.h 6 | * 7 | * Content: DirectX File public header file 8 | * 9 | ***************************************************************************/ 10 | 11 | #ifndef __DXFILE_H__ 12 | #define __DXFILE_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | typedef DWORD DXFILEFORMAT; 19 | 20 | #define DXFILEFORMAT_BINARY 0 21 | #define DXFILEFORMAT_TEXT 1 22 | #define DXFILEFORMAT_COMPRESSED 2 23 | 24 | typedef DWORD DXFILELOADOPTIONS; 25 | 26 | #define DXFILELOAD_FROMFILE 0x00L 27 | #define DXFILELOAD_FROMRESOURCE 0x01L 28 | #define DXFILELOAD_FROMMEMORY 0x02L 29 | #define DXFILELOAD_FROMSTREAM 0x04L 30 | #define DXFILELOAD_FROMURL 0x08L 31 | 32 | typedef struct _DXFILELOADRESOURCE { 33 | HMODULE hModule; 34 | LPCTSTR lpName; 35 | LPCTSTR lpType; 36 | }DXFILELOADRESOURCE, *LPDXFILELOADRESOURCE; 37 | 38 | typedef struct _DXFILELOADMEMORY { 39 | LPVOID lpMemory; 40 | DWORD dSize; 41 | }DXFILELOADMEMORY, *LPDXFILELOADMEMORY; 42 | 43 | /* 44 | * DirectX File object types. 45 | */ 46 | 47 | #ifndef WIN_TYPES 48 | #define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype 49 | #endif 50 | 51 | WIN_TYPES(IDirectXFile, DIRECTXFILE); 52 | WIN_TYPES(IDirectXFileEnumObject, DIRECTXFILEENUMOBJECT); 53 | WIN_TYPES(IDirectXFileSaveObject, DIRECTXFILESAVEOBJECT); 54 | WIN_TYPES(IDirectXFileObject, DIRECTXFILEOBJECT); 55 | WIN_TYPES(IDirectXFileData, DIRECTXFILEDATA); 56 | WIN_TYPES(IDirectXFileDataReference, DIRECTXFILEDATAREFERENCE); 57 | WIN_TYPES(IDirectXFileBinary, DIRECTXFILEBINARY); 58 | 59 | /* 60 | * API for creating IDirectXFile interface. 61 | */ 62 | 63 | STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile); 64 | 65 | /* 66 | * The methods for IUnknown 67 | */ 68 | 69 | #define IUNKNOWN_METHODS(kind) \ 70 | STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) kind; \ 71 | STDMETHOD_(ULONG, AddRef) (THIS) kind; \ 72 | STDMETHOD_(ULONG, Release) (THIS) kind 73 | 74 | /* 75 | * The methods for IDirectXFileObject 76 | */ 77 | 78 | #define IDIRECTXFILEOBJECT_METHODS(kind) \ 79 | STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) kind; \ 80 | STDMETHOD(GetId) (THIS_ LPGUID) kind 81 | 82 | /* 83 | * DirectX File interfaces. 84 | */ 85 | 86 | #undef INTERFACE 87 | #define INTERFACE IDirectXFile 88 | 89 | DECLARE_INTERFACE_(IDirectXFile, IUnknown) 90 | { 91 | IUNKNOWN_METHODS(PURE); 92 | STDMETHOD(CreateEnumObject) (THIS_ LPVOID, DXFILELOADOPTIONS, 93 | LPDIRECTXFILEENUMOBJECT *) PURE; 94 | STDMETHOD(CreateSaveObject) (THIS_ LPCSTR, DXFILEFORMAT, 95 | LPDIRECTXFILESAVEOBJECT *) PURE; 96 | STDMETHOD(RegisterTemplates) (THIS_ LPVOID, DWORD) PURE; 97 | }; 98 | 99 | #undef INTERFACE 100 | #define INTERFACE IDirectXFileEnumObject 101 | 102 | DECLARE_INTERFACE_(IDirectXFileEnumObject, IUnknown) 103 | { 104 | IUNKNOWN_METHODS(PURE); 105 | STDMETHOD(GetNextDataObject) (THIS_ LPDIRECTXFILEDATA *) PURE; 106 | STDMETHOD(GetDataObjectById) (THIS_ REFGUID, LPDIRECTXFILEDATA *) PURE; 107 | STDMETHOD(GetDataObjectByName) (THIS_ LPCSTR, LPDIRECTXFILEDATA *) PURE; 108 | }; 109 | 110 | #undef INTERFACE 111 | #define INTERFACE IDirectXFileSaveObject 112 | 113 | DECLARE_INTERFACE_(IDirectXFileSaveObject, IUnknown) 114 | { 115 | IUNKNOWN_METHODS(PURE); 116 | STDMETHOD(SaveTemplates) (THIS_ DWORD, const GUID **) PURE; 117 | STDMETHOD(CreateDataObject) (THIS_ REFGUID, LPCSTR, const GUID *, 118 | DWORD, LPVOID, LPDIRECTXFILEDATA *) PURE; 119 | STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE; 120 | }; 121 | 122 | 123 | #undef INTERFACE 124 | #define INTERFACE IDirectXFileObject 125 | 126 | DECLARE_INTERFACE_(IDirectXFileObject, IUnknown) 127 | { 128 | IUNKNOWN_METHODS(PURE); 129 | IDIRECTXFILEOBJECT_METHODS(PURE); 130 | }; 131 | 132 | #undef INTERFACE 133 | #define INTERFACE IDirectXFileData 134 | 135 | DECLARE_INTERFACE_(IDirectXFileData, IDirectXFileObject) 136 | { 137 | IUNKNOWN_METHODS(PURE); 138 | IDIRECTXFILEOBJECT_METHODS(PURE); 139 | 140 | STDMETHOD(GetData) (THIS_ LPCSTR, DWORD *, void **) PURE; 141 | STDMETHOD(GetType) (THIS_ const GUID **) PURE; 142 | STDMETHOD(GetNextObject) (THIS_ LPDIRECTXFILEOBJECT *) PURE; 143 | STDMETHOD(AddDataObject) (THIS_ LPDIRECTXFILEDATA) PURE; 144 | STDMETHOD(AddDataReference) (THIS_ LPCSTR, const GUID *) PURE; 145 | STDMETHOD(AddBinaryObject) (THIS_ LPCSTR, const GUID *, LPCSTR, LPVOID, DWORD) PURE; 146 | }; 147 | 148 | #undef INTERFACE 149 | #define INTERFACE IDirectXFileDataReference 150 | 151 | DECLARE_INTERFACE_(IDirectXFileDataReference, IDirectXFileObject) 152 | { 153 | IUNKNOWN_METHODS(PURE); 154 | IDIRECTXFILEOBJECT_METHODS(PURE); 155 | 156 | STDMETHOD(Resolve) (THIS_ LPDIRECTXFILEDATA *) PURE; 157 | }; 158 | 159 | #undef INTERFACE 160 | #define INTERFACE IDirectXFileBinary 161 | 162 | DECLARE_INTERFACE_(IDirectXFileBinary, IDirectXFileObject) 163 | { 164 | IUNKNOWN_METHODS(PURE); 165 | IDIRECTXFILEOBJECT_METHODS(PURE); 166 | 167 | STDMETHOD(GetSize) (THIS_ DWORD *) PURE; 168 | STDMETHOD(GetMimeType) (THIS_ LPCSTR *) PURE; 169 | STDMETHOD(Read) (THIS_ LPVOID, DWORD, LPDWORD) PURE; 170 | }; 171 | 172 | /* 173 | * DirectXFile Object Class Id (for CoCreateInstance()) 174 | */ 175 | 176 | DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); 177 | 178 | /* 179 | * DirectX File Interface GUIDs. 180 | */ 181 | 182 | DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 183 | DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 184 | DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 185 | DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 186 | DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 187 | DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 188 | DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 189 | 190 | /* 191 | * DirectX File Header template's GUID. 192 | */ 193 | 194 | DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 195 | 196 | 197 | /* 198 | * DirectX File errors. 199 | */ 200 | 201 | #define _FACDD 0x876 202 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 203 | 204 | #define DXFILE_OK 0 205 | 206 | #define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850) 207 | #define DXFILEERR_BADVALUE MAKE_DDHRESULT(851) 208 | #define DXFILEERR_BADTYPE MAKE_DDHRESULT(852) 209 | #define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853) 210 | #define DXFILEERR_BADALLOC MAKE_DDHRESULT(854) 211 | #define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855) 212 | #define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856) 213 | #define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857) 214 | #define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858) 215 | #define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859) 216 | #define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860) 217 | #define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861) 218 | #define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862) 219 | #define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863) 220 | #define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864) 221 | #define DXFILEERR_BADFILE MAKE_DDHRESULT(865) 222 | #define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866) 223 | #define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867) 224 | #define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868) 225 | #define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869) 226 | #define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870) 227 | #define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871) 228 | #define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872) 229 | #define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873) 230 | #define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874) 231 | #define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875) 232 | #define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876) 233 | 234 | 235 | #ifdef __cplusplus 236 | }; 237 | #endif 238 | 239 | #endif /* _DXFILE_H_ */ 240 | -------------------------------------------------------------------------------- /Include/D3DX11async.h: -------------------------------------------------------------------------------- 1 | 2 | ////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // Copyright (c) Microsoft Corporation. All rights reserved. 5 | // 6 | // File: D3DX11Async.h 7 | // Content: D3DX11 Asynchronous Shader loaders / compilers 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | 11 | #ifndef __D3DX11ASYNC_H__ 12 | #define __D3DX11ASYNC_H__ 13 | 14 | #include "d3dx11.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif //__cplusplus 19 | 20 | 21 | //---------------------------------------------------------------------------- 22 | // D3DX11Compile: 23 | // ------------------ 24 | // Compiles an effect or shader. 25 | // 26 | // Parameters: 27 | // pSrcFile 28 | // Source file name. 29 | // hSrcModule 30 | // Module handle. if NULL, current module will be used. 31 | // pSrcResource 32 | // Resource name in module. 33 | // pSrcData 34 | // Pointer to source code. 35 | // SrcDataLen 36 | // Size of source code, in bytes. 37 | // pDefines 38 | // Optional NULL-terminated array of preprocessor macro definitions. 39 | // pInclude 40 | // Optional interface pointer to use for handling #include directives. 41 | // If this parameter is NULL, #includes will be honored when compiling 42 | // from file, and will error when compiling from resource or memory. 43 | // pFunctionName 44 | // Name of the entrypoint function where execution should begin. 45 | // pProfile 46 | // Instruction set to be used when generating code. Currently supported 47 | // profiles are "vs_1_1", "vs_2_0", "vs_2_a", "vs_2_sw", "vs_3_0", 48 | // "vs_3_sw", "vs_4_0", "vs_4_1", 49 | // "ps_2_0", "ps_2_a", "ps_2_b", "ps_2_sw", "ps_3_0", 50 | // "ps_3_sw", "ps_4_0", "ps_4_1", 51 | // "gs_4_0", "gs_4_1", 52 | // "tx_1_0", 53 | // "fx_4_0", "fx_4_1" 54 | // Note that this entrypoint does not compile fx_2_0 targets, for that 55 | // you need to use the D3DX9 function. 56 | // Flags1 57 | // See D3D10_SHADER_xxx flags. 58 | // Flags2 59 | // See D3D10_EFFECT_xxx flags. 60 | // ppShader 61 | // Returns a buffer containing the created shader. This buffer contains 62 | // the compiled shader code, as well as any embedded debug and symbol 63 | // table info. (See D3D10GetShaderConstantTable) 64 | // ppErrorMsgs 65 | // Returns a buffer containing a listing of errors and warnings that were 66 | // encountered during the compile. If you are running in a debugger, 67 | // these are the same messages you will see in your debug output. 68 | // pHResult 69 | // Pointer to a memory location to receive the return value upon completion. 70 | // Maybe NULL if not needed. 71 | // If pPump != NULL, pHResult must be a valid memory location until the 72 | // the asynchronous execution completes. 73 | //---------------------------------------------------------------------------- 74 | 75 | HRESULT WINAPI D3DX11CompileFromFileA(LPCSTR pSrcFile,CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 76 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 77 | 78 | HRESULT WINAPI D3DX11CompileFromFileW(LPCWSTR pSrcFile, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 79 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 80 | 81 | #ifdef UNICODE 82 | #define D3DX11CompileFromFile D3DX11CompileFromFileW 83 | #else 84 | #define D3DX11CompileFromFile D3DX11CompileFromFileA 85 | #endif 86 | 87 | HRESULT WINAPI D3DX11CompileFromResourceA(HMODULE hSrcModule, LPCSTR pSrcResource, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 88 | LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 89 | 90 | HRESULT WINAPI D3DX11CompileFromResourceW(HMODULE hSrcModule, LPCWSTR pSrcResource, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 91 | LPD3D10INCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 92 | 93 | #ifdef UNICODE 94 | #define D3DX11CompileFromResource D3DX11CompileFromResourceW 95 | #else 96 | #define D3DX11CompileFromResource D3DX11CompileFromResourceA 97 | #endif 98 | 99 | HRESULT WINAPI D3DX11CompileFromMemory(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 100 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, ID3DX11ThreadPump* pPump, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 101 | 102 | HRESULT WINAPI D3DX11PreprocessShaderFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, 103 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 104 | 105 | HRESULT WINAPI D3DX11PreprocessShaderFromFileW(LPCWSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, 106 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 107 | 108 | HRESULT WINAPI D3DX11PreprocessShaderFromMemory(LPCSTR pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, 109 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 110 | 111 | HRESULT WINAPI D3DX11PreprocessShaderFromResourceA(HMODULE hModule, LPCSTR pResourceName, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 112 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 113 | 114 | HRESULT WINAPI D3DX11PreprocessShaderFromResourceW(HMODULE hModule, LPCWSTR pResourceName, LPCWSTR pSrcFileName, CONST D3D10_SHADER_MACRO* pDefines, 115 | LPD3D10INCLUDE pInclude, ID3DX11ThreadPump *pPump, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs, HRESULT* pHResult); 116 | 117 | #ifdef UNICODE 118 | #define D3DX11PreprocessShaderFromFile D3DX11PreprocessShaderFromFileW 119 | #define D3DX11PreprocessShaderFromResource D3DX11PreprocessShaderFromResourceW 120 | #else 121 | #define D3DX11PreprocessShaderFromFile D3DX11PreprocessShaderFromFileA 122 | #define D3DX11PreprocessShaderFromResource D3DX11PreprocessShaderFromResourceA 123 | #endif 124 | 125 | //---------------------------------------------------------------------------- 126 | // Async processors 127 | //---------------------------------------------------------------------------- 128 | 129 | HRESULT WINAPI D3DX11CreateAsyncCompilerProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 130 | LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags1, UINT Flags2, 131 | ID3D10Blob **ppCompiledShader, ID3D10Blob **ppErrorBuffer, ID3DX11DataProcessor **ppProcessor); 132 | 133 | HRESULT WINAPI D3DX11CreateAsyncShaderPreprocessProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, 134 | ID3D10Blob** ppShaderText, ID3D10Blob **ppErrorBuffer, ID3DX11DataProcessor **ppProcessor); 135 | 136 | //---------------------------------------------------------------------------- 137 | // D3DX11 Asynchronous texture I/O (advanced mode) 138 | //---------------------------------------------------------------------------- 139 | 140 | HRESULT WINAPI D3DX11CreateAsyncFileLoaderW(LPCWSTR pFileName, ID3DX11DataLoader **ppDataLoader); 141 | HRESULT WINAPI D3DX11CreateAsyncFileLoaderA(LPCSTR pFileName, ID3DX11DataLoader **ppDataLoader); 142 | HRESULT WINAPI D3DX11CreateAsyncMemoryLoader(LPCVOID pData, SIZE_T cbData, ID3DX11DataLoader **ppDataLoader); 143 | HRESULT WINAPI D3DX11CreateAsyncResourceLoaderW(HMODULE hSrcModule, LPCWSTR pSrcResource, ID3DX11DataLoader **ppDataLoader); 144 | HRESULT WINAPI D3DX11CreateAsyncResourceLoaderA(HMODULE hSrcModule, LPCSTR pSrcResource, ID3DX11DataLoader **ppDataLoader); 145 | 146 | #ifdef UNICODE 147 | #define D3DX11CreateAsyncFileLoader D3DX11CreateAsyncFileLoaderW 148 | #define D3DX11CreateAsyncResourceLoader D3DX11CreateAsyncResourceLoaderW 149 | #else 150 | #define D3DX11CreateAsyncFileLoader D3DX11CreateAsyncFileLoaderA 151 | #define D3DX11CreateAsyncResourceLoader D3DX11CreateAsyncResourceLoaderA 152 | #endif 153 | 154 | HRESULT WINAPI D3DX11CreateAsyncTextureProcessor(ID3D11Device *pDevice, D3DX11_IMAGE_LOAD_INFO *pLoadInfo, ID3DX11DataProcessor **ppDataProcessor); 155 | HRESULT WINAPI D3DX11CreateAsyncTextureInfoProcessor(D3DX11_IMAGE_INFO *pImageInfo, ID3DX11DataProcessor **ppDataProcessor); 156 | HRESULT WINAPI D3DX11CreateAsyncShaderResourceViewProcessor(ID3D11Device *pDevice, D3DX11_IMAGE_LOAD_INFO *pLoadInfo, ID3DX11DataProcessor **ppDataProcessor); 157 | 158 | #ifdef __cplusplus 159 | } 160 | #endif //__cplusplus 161 | 162 | #endif //__D3DX11ASYNC_H__ 163 | 164 | 165 | -------------------------------------------------------------------------------- /Include/rmxfguid.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: rmxfguid.h 6 | * 7 | * Content: Defines GUIDs of D3DRM's templates. 8 | * 9 | ***************************************************************************/ 10 | 11 | #ifndef __RMXFGUID_H_ 12 | #define __RMXFGUID_H_ 13 | 14 | /* {2B957100-9E9A-11cf-AB39-0020AF71E433} */ 15 | DEFINE_GUID(TID_D3DRMInfo, 16 | 0x2b957100, 0x9e9a, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 17 | 18 | /* {3D82AB44-62DA-11cf-AB39-0020AF71E433} */ 19 | DEFINE_GUID(TID_D3DRMMesh, 20 | 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 21 | 22 | /* {3D82AB5E-62DA-11cf-AB39-0020AF71E433} */ 23 | DEFINE_GUID(TID_D3DRMVector, 24 | 0x3d82ab5e, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 25 | 26 | /* {3D82AB5F-62DA-11cf-AB39-0020AF71E433} */ 27 | DEFINE_GUID(TID_D3DRMMeshFace, 28 | 0x3d82ab5f, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 29 | 30 | /* {3D82AB4D-62DA-11cf-AB39-0020AF71E433} */ 31 | DEFINE_GUID(TID_D3DRMMaterial, 32 | 0x3d82ab4d, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 33 | 34 | /* {35FF44E1-6C7C-11cf-8F52-0040333594A3} */ 35 | DEFINE_GUID(TID_D3DRMMaterialArray, 36 | 0x35ff44e1, 0x6c7c, 0x11cf, 0x8F, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 37 | 38 | /* {3D82AB46-62DA-11cf-AB39-0020AF71E433} */ 39 | DEFINE_GUID(TID_D3DRMFrame, 40 | 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 41 | 42 | /* {F6F23F41-7686-11cf-8F52-0040333594A3} */ 43 | DEFINE_GUID(TID_D3DRMFrameTransformMatrix, 44 | 0xf6f23f41, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 45 | 46 | /* {F6F23F42-7686-11cf-8F52-0040333594A3} */ 47 | DEFINE_GUID(TID_D3DRMMeshMaterialList, 48 | 0xf6f23f42, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 49 | 50 | /* {F6F23F40-7686-11cf-8F52-0040333594A3} */ 51 | DEFINE_GUID(TID_D3DRMMeshTextureCoords, 52 | 0xf6f23f40, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 53 | 54 | /* {F6F23F43-7686-11cf-8F52-0040333594A3} */ 55 | DEFINE_GUID(TID_D3DRMMeshNormals, 56 | 0xf6f23f43, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 57 | 58 | /* {F6F23F44-7686-11cf-8F52-0040333594A3} */ 59 | DEFINE_GUID(TID_D3DRMCoords2d, 60 | 0xf6f23f44, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 61 | 62 | /* {F6F23F45-7686-11cf-8F52-0040333594A3} */ 63 | DEFINE_GUID(TID_D3DRMMatrix4x4, 64 | 0xf6f23f45, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 65 | 66 | /* {3D82AB4F-62DA-11cf-AB39-0020AF71E433} */ 67 | DEFINE_GUID(TID_D3DRMAnimation, 68 | 0x3d82ab4f, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 69 | 70 | /* {3D82AB50-62DA-11cf-AB39-0020AF71E433} */ 71 | DEFINE_GUID(TID_D3DRMAnimationSet, 72 | 0x3d82ab50, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 73 | 74 | /* {10DD46A8-775B-11cf-8F52-0040333594A3} */ 75 | DEFINE_GUID(TID_D3DRMAnimationKey, 76 | 0x10dd46a8, 0x775b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); 77 | 78 | /* {10DD46A9-775B-11cf-8F52-0040333594A3} */ 79 | DEFINE_GUID(TID_D3DRMFloatKeys, 80 | 0x10dd46a9, 0x775b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); 81 | 82 | /* {01411840-7786-11cf-8F52-0040333594A3} */ 83 | DEFINE_GUID(TID_D3DRMMaterialAmbientColor, 84 | 0x01411840, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); 85 | 86 | /* {01411841-7786-11cf-8F52-0040333594A3} */ 87 | DEFINE_GUID(TID_D3DRMMaterialDiffuseColor, 88 | 0x01411841, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); 89 | 90 | /* {01411842-7786-11cf-8F52-0040333594A3} */ 91 | DEFINE_GUID(TID_D3DRMMaterialSpecularColor, 92 | 0x01411842, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); 93 | 94 | /* {D3E16E80-7835-11cf-8F52-0040333594A3} */ 95 | DEFINE_GUID(TID_D3DRMMaterialEmissiveColor, 96 | 0xd3e16e80, 0x7835, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 97 | 98 | /* {01411843-7786-11cf-8F52-0040333594A3} */ 99 | DEFINE_GUID(TID_D3DRMMaterialPower, 100 | 0x01411843, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); 101 | 102 | /* {35FF44E0-6C7C-11cf-8F52-0040333594A3} */ 103 | DEFINE_GUID(TID_D3DRMColorRGBA, 104 | 0x35ff44e0, 0x6c7c, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); 105 | 106 | /* {D3E16E81-7835-11cf-8F52-0040333594A3} */ 107 | DEFINE_GUID(TID_D3DRMColorRGB, 108 | 0xd3e16e81, 0x7835, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 109 | 110 | /* {A42790E0-7810-11cf-8F52-0040333594A3} */ 111 | DEFINE_GUID(TID_D3DRMGuid, 112 | 0xa42790e0, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 113 | 114 | /* {A42790E1-7810-11cf-8F52-0040333594A3} */ 115 | DEFINE_GUID(TID_D3DRMTextureFilename, 116 | 0xa42790e1, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 117 | 118 | /* {A42790E2-7810-11cf-8F52-0040333594A3} */ 119 | DEFINE_GUID(TID_D3DRMTextureReference, 120 | 0xa42790e2, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 121 | 122 | /* {1630B820-7842-11cf-8F52-0040333594A3} */ 123 | DEFINE_GUID(TID_D3DRMIndexedColor, 124 | 0x1630b820, 0x7842, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 125 | 126 | /* {1630B821-7842-11cf-8F52-0040333594A3} */ 127 | DEFINE_GUID(TID_D3DRMMeshVertexColors, 128 | 0x1630b821, 0x7842, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 129 | 130 | /* {4885AE60-78E8-11cf-8F52-0040333594A3} */ 131 | DEFINE_GUID(TID_D3DRMMaterialWrap, 132 | 0x4885ae60, 0x78e8, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 133 | 134 | /* {537DA6A0-CA37-11d0-941C-0080C80CFA7B} */ 135 | DEFINE_GUID(TID_D3DRMBoolean, 136 | 0x537da6a0, 0xca37, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); 137 | 138 | /* {ED1EC5C0-C0A8-11d0-941C-0080C80CFA7B} */ 139 | DEFINE_GUID(TID_D3DRMMeshFaceWraps, 140 | 0xed1ec5c0, 0xc0a8, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); 141 | 142 | /* {4885AE63-78E8-11cf-8F52-0040333594A3} */ 143 | DEFINE_GUID(TID_D3DRMBoolean2d, 144 | 0x4885ae63, 0x78e8, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 145 | 146 | /* {F406B180-7B3B-11cf-8F52-0040333594A3} */ 147 | DEFINE_GUID(TID_D3DRMTimedFloatKeys, 148 | 0xf406b180, 0x7b3b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 149 | 150 | /* {E2BF56C0-840F-11cf-8F52-0040333594A3} */ 151 | DEFINE_GUID(TID_D3DRMAnimationOptions, 152 | 0xe2bf56c0, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 153 | 154 | /* {E2BF56C1-840F-11cf-8F52-0040333594A3} */ 155 | DEFINE_GUID(TID_D3DRMFramePosition, 156 | 0xe2bf56c1, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 157 | 158 | /* {E2BF56C2-840F-11cf-8F52-0040333594A3} */ 159 | DEFINE_GUID(TID_D3DRMFrameVelocity, 160 | 0xe2bf56c2, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 161 | 162 | /* {E2BF56C3-840F-11cf-8F52-0040333594A3} */ 163 | DEFINE_GUID(TID_D3DRMFrameRotation, 164 | 0xe2bf56c3, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); 165 | 166 | /* {3D82AB4A-62DA-11cf-AB39-0020AF71E433} */ 167 | DEFINE_GUID(TID_D3DRMLight, 168 | 0x3d82ab4a, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 169 | 170 | /* {3D82AB51-62DA-11cf-AB39-0020AF71E433} */ 171 | DEFINE_GUID(TID_D3DRMCamera, 172 | 0x3d82ab51, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 173 | 174 | /* {E5745280-B24F-11cf-9DD5-00AA00A71A2F} */ 175 | DEFINE_GUID(TID_D3DRMAppData, 176 | 0xe5745280, 0xb24f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); 177 | 178 | /* {AED22740-B31F-11cf-9DD5-00AA00A71A2F} */ 179 | DEFINE_GUID(TID_D3DRMLightUmbra, 180 | 0xaed22740, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); 181 | 182 | /* {AED22742-B31F-11cf-9DD5-00AA00A71A2F} */ 183 | DEFINE_GUID(TID_D3DRMLightRange, 184 | 0xaed22742, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); 185 | 186 | /* {AED22741-B31F-11cf-9DD5-00AA00A71A2F} */ 187 | DEFINE_GUID(TID_D3DRMLightPenumbra, 188 | 0xaed22741, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); 189 | 190 | /* {A8A98BA0-C5E5-11cf-B941-0080C80CFA7B} */ 191 | DEFINE_GUID(TID_D3DRMLightAttenuation, 192 | 0xa8a98ba0, 0xc5e5, 0x11cf, 0xb9, 0x41, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); 193 | 194 | /* {3A23EEA0-94B1-11d0-AB39-0020AF71E433} */ 195 | DEFINE_GUID(TID_D3DRMInlineData, 196 | 0x3a23eea0, 0x94b1, 0x11d0, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 197 | 198 | /* {3A23EEA1-94B1-11d0-AB39-0020AF71E433} */ 199 | DEFINE_GUID(TID_D3DRMUrl, 200 | 0x3a23eea1, 0x94b1, 0x11d0, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); 201 | 202 | /* {8A63C360-997D-11d0-941C-0080C80CFA7B} */ 203 | DEFINE_GUID(TID_D3DRMProgressiveMesh, 204 | 0x8A63C360, 0x997D, 0x11d0, 0x94, 0x1C, 0x0, 0x80, 0xC8, 0x0C, 0xFA, 0x7B); 205 | 206 | /* {98116AA0-BDBA-11d1-82C0-00A0C9697271} */ 207 | DEFINE_GUID(TID_D3DRMExternalVisual, 208 | 0x98116AA0, 0xBDBA, 0x11d1, 0x82, 0xC0, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x71); 209 | 210 | /* {7F0F21E0-BFE1-11d1-82C0-00A0C9697271} */ 211 | DEFINE_GUID(TID_D3DRMStringProperty, 212 | 0x7f0f21e0, 0xbfe1, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); 213 | 214 | /* {7F0F21E1-BFE1-11d1-82C0-00A0C9697271} */ 215 | DEFINE_GUID(TID_D3DRMPropertyBag, 216 | 0x7f0f21e1, 0xbfe1, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); 217 | 218 | // {7F5D5EA0-D53A-11d1-82C0-00A0C9697271} 219 | DEFINE_GUID(TID_D3DRMRightHanded, 220 | 0x7f5d5ea0, 0xd53a, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); 221 | 222 | #endif /* __RMXFGUID_H_ */ 223 | 224 | -------------------------------------------------------------------------------- /Include/dsetup.h: -------------------------------------------------------------------------------- 1 | /*========================================================================== 2 | * 3 | * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: dsetup.h 6 | * Content: DirectXSetup, error codes and flags 7 | ***************************************************************************/ 8 | 9 | #ifndef __DSETUP_H__ 10 | #define __DSETUP_H__ 11 | 12 | #include // windows stuff 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #define FOURCC_VERS mmioFOURCC('v','e','r','s') 19 | 20 | // DSETUP Error Codes, must remain compatible with previous setup. 21 | #define DSETUPERR_SUCCESS_RESTART 1 22 | #define DSETUPERR_SUCCESS 0 23 | #define DSETUPERR_BADWINDOWSVERSION -1 24 | #define DSETUPERR_SOURCEFILENOTFOUND -2 25 | #define DSETUPERR_NOCOPY -5 26 | #define DSETUPERR_OUTOFDISKSPACE -6 27 | #define DSETUPERR_CANTFINDINF -7 28 | #define DSETUPERR_CANTFINDDIR -8 29 | #define DSETUPERR_INTERNAL -9 30 | #define DSETUPERR_UNKNOWNOS -11 31 | #define DSETUPERR_NEWERVERSION -14 32 | #define DSETUPERR_NOTADMIN -15 33 | #define DSETUPERR_UNSUPPORTEDPROCESSOR -16 34 | #define DSETUPERR_MISSINGCAB_MANAGEDDX -17 35 | #define DSETUPERR_NODOTNETFRAMEWORKINSTALLED -18 36 | #define DSETUPERR_CABDOWNLOADFAIL -19 37 | #define DSETUPERR_DXCOMPONENTFILEINUSE -20 38 | #define DSETUPERR_UNTRUSTEDCABINETFILE -21 39 | 40 | // DSETUP flags. DirectX 5.0 apps should use these flags only. 41 | #define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */ 42 | #define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */ 43 | #define DSETUP_DXCORE 0x00010000 /* install DirectX runtime */ 44 | #define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV) 45 | #define DSETUP_MANAGEDDX 0x00004000 /* OBSOLETE. install managed DirectX */ 46 | #define DSETUP_TESTINSTALL 0x00020000 /* just test install, don't do anything */ 47 | 48 | // These OBSOLETE flags are here for compatibility with pre-DX5 apps only. 49 | // They are present to allow DX3 apps to be recompiled with DX5 and still work. 50 | // DO NOT USE THEM for DX5. They will go away in future DX releases. 51 | #define DSETUP_DDRAW 0x00000001 /* OBSOLETE. install DirectDraw */ 52 | #define DSETUP_DSOUND 0x00000002 /* OBSOLETE. install DirectSound */ 53 | #define DSETUP_DPLAY 0x00000004 /* OBSOLETE. install DirectPlay */ 54 | #define DSETUP_DPLAYSP 0x00000020 /* OBSOLETE. install DirectPlay Providers */ 55 | #define DSETUP_DVIDEO 0x00000040 /* OBSOLETE. install DirectVideo */ 56 | #define DSETUP_D3D 0x00000200 /* OBSOLETE. install Direct3D */ 57 | #define DSETUP_DINPUT 0x00000800 /* OBSOLETE. install DirectInput */ 58 | #define DSETUP_DIRECTXSETUP 0x00001000 /* OBSOLETE. install DirectXSetup DLL's */ 59 | #define DSETUP_NOUI 0x00002000 /* OBSOLETE. install DirectX with NO UI */ 60 | #define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */ 61 | #define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */ 62 | 63 | 64 | 65 | //****************************************************************** 66 | // DirectX Setup Callback mechanism 67 | //****************************************************************** 68 | 69 | // DSETUP Message Info Codes, passed to callback as Reason parameter. 70 | #define DSETUP_CB_MSG_NOMESSAGE 0 71 | #define DSETUP_CB_MSG_INTERNAL_ERROR 10 72 | #define DSETUP_CB_MSG_BEGIN_INSTALL 13 73 | #define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14 74 | #define DSETUP_CB_MSG_PROGRESS 18 75 | #define DSETUP_CB_MSG_WARNING_DISABLED_COMPONENT 19 76 | 77 | 78 | 79 | 80 | 81 | 82 | typedef struct _DSETUP_CB_PROGRESS 83 | { 84 | DWORD dwPhase; 85 | DWORD dwInPhaseMaximum; 86 | DWORD dwInPhaseProgress; 87 | DWORD dwOverallMaximum; 88 | DWORD dwOverallProgress; 89 | } DSETUP_CB_PROGRESS; 90 | 91 | 92 | enum _DSETUP_CB_PROGRESS_PHASE 93 | { 94 | DSETUP_INITIALIZING, 95 | DSETUP_EXTRACTING, 96 | DSETUP_COPYING, 97 | DSETUP_FINALIZING 98 | }; 99 | 100 | 101 | #ifdef _WIN32 102 | // 103 | // Data Structures 104 | // 105 | #ifndef UNICODE_ONLY 106 | 107 | typedef struct _DIRECTXREGISTERAPPA { 108 | DWORD dwSize; 109 | DWORD dwFlags; 110 | LPSTR lpszApplicationName; 111 | LPGUID lpGUID; 112 | LPSTR lpszFilename; 113 | LPSTR lpszCommandLine; 114 | LPSTR lpszPath; 115 | LPSTR lpszCurrentDirectory; 116 | } DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA; 117 | 118 | typedef struct _DIRECTXREGISTERAPP2A { 119 | DWORD dwSize; 120 | DWORD dwFlags; 121 | LPSTR lpszApplicationName; 122 | LPGUID lpGUID; 123 | LPSTR lpszFilename; 124 | LPSTR lpszCommandLine; 125 | LPSTR lpszPath; 126 | LPSTR lpszCurrentDirectory; 127 | LPSTR lpszLauncherName; 128 | } DIRECTXREGISTERAPP2A, *PDIRECTXREGISTERAPP2A, *LPDIRECTXREGISTERAPP2A; 129 | 130 | #endif //!UNICODE_ONLY 131 | #ifndef ANSI_ONLY 132 | 133 | typedef struct _DIRECTXREGISTERAPPW { 134 | DWORD dwSize; 135 | DWORD dwFlags; 136 | LPWSTR lpszApplicationName; 137 | LPGUID lpGUID; 138 | LPWSTR lpszFilename; 139 | LPWSTR lpszCommandLine; 140 | LPWSTR lpszPath; 141 | LPWSTR lpszCurrentDirectory; 142 | } DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW; 143 | 144 | typedef struct _DIRECTXREGISTERAPP2W { 145 | DWORD dwSize; 146 | DWORD dwFlags; 147 | LPWSTR lpszApplicationName; 148 | LPGUID lpGUID; 149 | LPWSTR lpszFilename; 150 | LPWSTR lpszCommandLine; 151 | LPWSTR lpszPath; 152 | LPWSTR lpszCurrentDirectory; 153 | LPWSTR lpszLauncherName; 154 | } DIRECTXREGISTERAPP2W, *PDIRECTXREGISTERAPP2W, *LPDIRECTXREGISTERAPP2W; 155 | #endif //!ANSI_ONLY 156 | #ifdef UNICODE 157 | typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP; 158 | typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP; 159 | typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP; 160 | typedef DIRECTXREGISTERAPP2W DIRECTXREGISTERAPP2; 161 | typedef PDIRECTXREGISTERAPP2W PDIRECTXREGISTERAPP2; 162 | typedef LPDIRECTXREGISTERAPP2W LPDIRECTXREGISTERAPP2; 163 | #else 164 | typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP; 165 | typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP; 166 | typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP; 167 | typedef DIRECTXREGISTERAPP2A DIRECTXREGISTERAPP2; 168 | typedef PDIRECTXREGISTERAPP2A PDIRECTXREGISTERAPP2; 169 | typedef LPDIRECTXREGISTERAPP2A LPDIRECTXREGISTERAPP2; 170 | #endif // UNICODE 171 | 172 | 173 | // 174 | // API 175 | // 176 | 177 | #ifndef UNICODE_ONLY 178 | INT 179 | WINAPI 180 | DirectXSetupA( 181 | HWND hWnd, 182 | __in_opt LPSTR lpszRootPath, 183 | DWORD dwFlags 184 | ); 185 | #endif //!UNICODE_ONLY 186 | #ifndef ANSI_ONLY 187 | INT 188 | WINAPI 189 | DirectXSetupW( 190 | HWND hWnd, 191 | __in_opt LPWSTR lpszRootPath, 192 | DWORD dwFlags 193 | ); 194 | #endif //!ANSI_ONLY 195 | #ifdef UNICODE 196 | #define DirectXSetup DirectXSetupW 197 | #else 198 | #define DirectXSetup DirectXSetupA 199 | #endif // !UNICODE 200 | 201 | #ifndef UNICODE_ONLY 202 | INT 203 | WINAPI 204 | DirectXRegisterApplicationA( 205 | HWND hWnd, 206 | LPVOID lpDXRegApp 207 | ); 208 | #endif //!UNICODE_ONLY 209 | #ifndef ANSI_ONLY 210 | INT 211 | WINAPI 212 | DirectXRegisterApplicationW( 213 | HWND hWnd, 214 | LPVOID lpDXRegApp 215 | ); 216 | #endif //!ANSI_ONLY 217 | #ifdef UNICODE 218 | #define DirectXRegisterApplication DirectXRegisterApplicationW 219 | #else 220 | #define DirectXRegisterApplication DirectXRegisterApplicationA 221 | #endif // !UNICODE 222 | 223 | INT 224 | WINAPI 225 | DirectXUnRegisterApplication( 226 | HWND hWnd, 227 | LPGUID lpGUID 228 | ); 229 | 230 | // 231 | // Function Pointers 232 | // 233 | #ifdef UNICODE 234 | typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD); 235 | typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID); 236 | #else 237 | typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD); 238 | typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID); 239 | #endif // UNICODE 240 | 241 | typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason, 242 | DWORD MsgType, /* Same as flags to MessageBox */ 243 | LPSTR szMessage, 244 | LPSTR szName, 245 | void *pInfo); 246 | 247 | INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback); 248 | INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion); 249 | INT WINAPI DirectXSetupShowEULA(HWND hWndParent); 250 | #ifndef UNICODE_ONLY 251 | UINT 252 | WINAPI 253 | DirectXSetupGetEULAA( 254 | __out_ecount(cchEULA) LPSTR lpszEULA, 255 | UINT cchEULA, 256 | WORD LangID 257 | ); 258 | #endif //!UNICODE_ONLY 259 | #ifndef ANSI_ONLY 260 | UINT 261 | WINAPI 262 | DirectXSetupGetEULAW( 263 | __out_ecount(cchEULA) LPWSTR lpszEULA, 264 | UINT cchEULA, 265 | WORD LangID 266 | ); 267 | #endif //!ANSI_ONLY 268 | #ifdef UNICODE 269 | #define DirectXSetupGetEULA DirectXSetupGetEULAW 270 | typedef UINT (WINAPI * LPDIRECTXSETUPGETEULA)(LPWSTR, UINT, WORD); 271 | #else 272 | #define DirectXSetupGetEULA DirectXSetupGetEULAA 273 | typedef UINT (WINAPI * LPDIRECTXSETUPGETEULA)(LPSTR, UINT, WORD); 274 | #endif // !UNICODE 275 | 276 | #endif // WIN32 277 | 278 | 279 | #ifdef __cplusplus 280 | }; 281 | #endif 282 | 283 | #endif 284 | -------------------------------------------------------------------------------- /Include/XInput.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * * 3 | * XInput.h -- This module defines XBOX controller APIs * 4 | * and constansts for the Windows platform. * 5 | * * 6 | * Copyright (c) Microsoft Corp. All rights reserved. * 7 | * * 8 | ***************************************************************************/ 9 | #ifndef _XINPUT_H_ 10 | #define _XINPUT_H_ 11 | 12 | #include 13 | 14 | // Current name of the DLL shipped in the same SDK as this header. 15 | // The name reflects the current version 16 | #ifndef XINPUT_USE_9_1_0 17 | #define XINPUT_DLL_A "xinput1_3.dll" 18 | #define XINPUT_DLL_W L"xinput1_3.dll" 19 | #else 20 | #define XINPUT_DLL_A "xinput9_1_0.dll" 21 | #define XINPUT_DLL_W L"xinput9_1_0.dll" 22 | #endif 23 | #ifdef UNICODE 24 | #define XINPUT_DLL XINPUT_DLL_W 25 | #else 26 | #define XINPUT_DLL XINPUT_DLL_A 27 | #endif 28 | 29 | // 30 | // Device types available in XINPUT_CAPABILITIES 31 | // 32 | #define XINPUT_DEVTYPE_GAMEPAD 0x01 33 | 34 | // 35 | // Device subtypes available in XINPUT_CAPABILITIES 36 | // 37 | #define XINPUT_DEVSUBTYPE_GAMEPAD 0x01 38 | 39 | #ifndef XINPUT_USE_9_1_0 40 | 41 | #define XINPUT_DEVSUBTYPE_WHEEL 0x02 42 | #define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03 43 | #define XINPUT_DEVSUBTYPE_FLIGHT_SICK 0x04 44 | #define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05 45 | #define XINPUT_DEVSUBTYPE_GUITAR 0x06 46 | #define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08 47 | 48 | #endif // !XINPUT_USE_9_1_0 49 | 50 | 51 | 52 | // 53 | // Flags for XINPUT_CAPABILITIES 54 | // 55 | #define XINPUT_CAPS_VOICE_SUPPORTED 0x0004 56 | 57 | // 58 | // Constants for gamepad buttons 59 | // 60 | #define XINPUT_GAMEPAD_DPAD_UP 0x0001 61 | #define XINPUT_GAMEPAD_DPAD_DOWN 0x0002 62 | #define XINPUT_GAMEPAD_DPAD_LEFT 0x0004 63 | #define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008 64 | #define XINPUT_GAMEPAD_START 0x0010 65 | #define XINPUT_GAMEPAD_BACK 0x0020 66 | #define XINPUT_GAMEPAD_LEFT_THUMB 0x0040 67 | #define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080 68 | #define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100 69 | #define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200 70 | #define XINPUT_GAMEPAD_A 0x1000 71 | #define XINPUT_GAMEPAD_B 0x2000 72 | #define XINPUT_GAMEPAD_X 0x4000 73 | #define XINPUT_GAMEPAD_Y 0x8000 74 | 75 | 76 | // 77 | // Gamepad thresholds 78 | // 79 | #define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849 80 | #define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689 81 | #define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30 82 | 83 | // 84 | // Flags to pass to XInputGetCapabilities 85 | // 86 | #define XINPUT_FLAG_GAMEPAD 0x00000001 87 | 88 | 89 | #ifndef XINPUT_USE_9_1_0 90 | 91 | // 92 | // Devices that support batteries 93 | // 94 | #define BATTERY_DEVTYPE_GAMEPAD 0x00 95 | #define BATTERY_DEVTYPE_HEADSET 0x01 96 | 97 | // 98 | // Flags for battery status level 99 | // 100 | #define BATTERY_TYPE_DISCONNECTED 0x00 // This device is not connected 101 | #define BATTERY_TYPE_WIRED 0x01 // Wired device, no battery 102 | #define BATTERY_TYPE_ALKALINE 0x02 // Alkaline battery source 103 | #define BATTERY_TYPE_NIMH 0x03 // Nickel Metal Hydride battery source 104 | #define BATTERY_TYPE_UNKNOWN 0xFF // Cannot determine the battery type 105 | 106 | // These are only valid for wireless, connected devices, with known battery types 107 | // The amount of use time remaining depends on the type of device. 108 | #define BATTERY_LEVEL_EMPTY 0x00 109 | #define BATTERY_LEVEL_LOW 0x01 110 | #define BATTERY_LEVEL_MEDIUM 0x02 111 | #define BATTERY_LEVEL_FULL 0x03 112 | 113 | // User index definitions 114 | #define XUSER_MAX_COUNT 4 115 | 116 | #define XUSER_INDEX_ANY 0x000000FF 117 | 118 | 119 | // 120 | // Codes returned for the gamepad keystroke 121 | // 122 | 123 | #define VK_PAD_A 0x5800 124 | #define VK_PAD_B 0x5801 125 | #define VK_PAD_X 0x5802 126 | #define VK_PAD_Y 0x5803 127 | #define VK_PAD_RSHOULDER 0x5804 128 | #define VK_PAD_LSHOULDER 0x5805 129 | #define VK_PAD_LTRIGGER 0x5806 130 | #define VK_PAD_RTRIGGER 0x5807 131 | 132 | #define VK_PAD_DPAD_UP 0x5810 133 | #define VK_PAD_DPAD_DOWN 0x5811 134 | #define VK_PAD_DPAD_LEFT 0x5812 135 | #define VK_PAD_DPAD_RIGHT 0x5813 136 | #define VK_PAD_START 0x5814 137 | #define VK_PAD_BACK 0x5815 138 | #define VK_PAD_LTHUMB_PRESS 0x5816 139 | #define VK_PAD_RTHUMB_PRESS 0x5817 140 | 141 | #define VK_PAD_LTHUMB_UP 0x5820 142 | #define VK_PAD_LTHUMB_DOWN 0x5821 143 | #define VK_PAD_LTHUMB_RIGHT 0x5822 144 | #define VK_PAD_LTHUMB_LEFT 0x5823 145 | #define VK_PAD_LTHUMB_UPLEFT 0x5824 146 | #define VK_PAD_LTHUMB_UPRIGHT 0x5825 147 | #define VK_PAD_LTHUMB_DOWNRIGHT 0x5826 148 | #define VK_PAD_LTHUMB_DOWNLEFT 0x5827 149 | 150 | #define VK_PAD_RTHUMB_UP 0x5830 151 | #define VK_PAD_RTHUMB_DOWN 0x5831 152 | #define VK_PAD_RTHUMB_RIGHT 0x5832 153 | #define VK_PAD_RTHUMB_LEFT 0x5833 154 | #define VK_PAD_RTHUMB_UPLEFT 0x5834 155 | #define VK_PAD_RTHUMB_UPRIGHT 0x5835 156 | #define VK_PAD_RTHUMB_DOWNRIGHT 0x5836 157 | #define VK_PAD_RTHUMB_DOWNLEFT 0x5837 158 | 159 | // 160 | // Flags used in XINPUT_KEYSTROKE 161 | // 162 | #define XINPUT_KEYSTROKE_KEYDOWN 0x0001 163 | #define XINPUT_KEYSTROKE_KEYUP 0x0002 164 | #define XINPUT_KEYSTROKE_REPEAT 0x0004 165 | 166 | #endif //!XINPUT_USE_9_1_0 167 | 168 | // 169 | // Structures used by XInput APIs 170 | // 171 | typedef struct _XINPUT_GAMEPAD 172 | { 173 | WORD wButtons; 174 | BYTE bLeftTrigger; 175 | BYTE bRightTrigger; 176 | SHORT sThumbLX; 177 | SHORT sThumbLY; 178 | SHORT sThumbRX; 179 | SHORT sThumbRY; 180 | } XINPUT_GAMEPAD, *PXINPUT_GAMEPAD; 181 | 182 | typedef struct _XINPUT_STATE 183 | { 184 | DWORD dwPacketNumber; 185 | XINPUT_GAMEPAD Gamepad; 186 | } XINPUT_STATE, *PXINPUT_STATE; 187 | 188 | typedef struct _XINPUT_VIBRATION 189 | { 190 | WORD wLeftMotorSpeed; 191 | WORD wRightMotorSpeed; 192 | } XINPUT_VIBRATION, *PXINPUT_VIBRATION; 193 | 194 | typedef struct _XINPUT_CAPABILITIES 195 | { 196 | BYTE Type; 197 | BYTE SubType; 198 | WORD Flags; 199 | XINPUT_GAMEPAD Gamepad; 200 | XINPUT_VIBRATION Vibration; 201 | } XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES; 202 | 203 | #ifndef XINPUT_USE_9_1_0 204 | 205 | typedef struct _XINPUT_BATTERY_INFORMATION 206 | { 207 | BYTE BatteryType; 208 | BYTE BatteryLevel; 209 | } XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION; 210 | 211 | typedef struct _XINPUT_KEYSTROKE 212 | { 213 | WORD VirtualKey; 214 | WCHAR Unicode; 215 | WORD Flags; 216 | BYTE UserIndex; 217 | BYTE HidCode; 218 | } XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE; 219 | 220 | #endif // !XINPUT_USE_9_1_0 221 | 222 | // 223 | // XInput APIs 224 | // 225 | #ifdef __cplusplus 226 | extern "C" { 227 | #endif 228 | 229 | DWORD WINAPI XInputGetState 230 | ( 231 | __in DWORD dwUserIndex, // Index of the gamer associated with the device 232 | __out XINPUT_STATE* pState // Receives the current state 233 | ); 234 | 235 | DWORD WINAPI XInputSetState 236 | ( 237 | __in DWORD dwUserIndex, // Index of the gamer associated with the device 238 | __in XINPUT_VIBRATION* pVibration // The vibration information to send to the controller 239 | ); 240 | 241 | DWORD WINAPI XInputGetCapabilities 242 | ( 243 | __in DWORD dwUserIndex, // Index of the gamer associated with the device 244 | __in DWORD dwFlags, // Input flags that identify the device type 245 | __out XINPUT_CAPABILITIES* pCapabilities // Receives the capabilities 246 | ); 247 | 248 | void WINAPI XInputEnable 249 | ( 250 | __in BOOL enable // [in] Indicates whether xinput is enabled or disabled. 251 | ); 252 | 253 | DWORD WINAPI XInputGetDSoundAudioDeviceGuids 254 | ( 255 | __in DWORD dwUserIndex, // Index of the gamer associated with the device 256 | __out GUID* pDSoundRenderGuid, // DSound device ID for render 257 | __out GUID* pDSoundCaptureGuid // DSound device ID for capture 258 | ); 259 | 260 | #ifndef XINPUT_USE_9_1_0 261 | 262 | DWORD WINAPI XInputGetBatteryInformation 263 | ( 264 | __in DWORD dwUserIndex, // Index of the gamer associated with the device 265 | __in BYTE devType, // Which device on this user index 266 | __out XINPUT_BATTERY_INFORMATION* pBatteryInformation // Contains the level and types of batteries 267 | ); 268 | 269 | DWORD WINAPI XInputGetKeystroke 270 | ( 271 | __in DWORD dwUserIndex, // Index of the gamer associated with the device 272 | __reserved DWORD dwReserved, // Reserved for future use 273 | __out PXINPUT_KEYSTROKE pKeystroke // Pointer to an XINPUT_KEYSTROKE structure that receives an input event. 274 | ); 275 | 276 | #endif //!XINPUT_USE_9_1_0 277 | 278 | #ifdef __cplusplus 279 | } 280 | #endif 281 | 282 | #endif //_XINPUT_H_ 283 | 284 | -------------------------------------------------------------------------------- /Include/dsconf.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * Copyright (c) Microsoft Corporation. All rights reserved. 4 | * 5 | * File: dsconf.h 6 | * Content: DirectSound configuration interface include file 7 | * 8 | **************************************************************************/ 9 | 10 | #ifndef __DSCONF_INCLUDED__ 11 | #define __DSCONF_INCLUDED__ 12 | 13 | #ifndef __DSOUND_INCLUDED__ 14 | #error dsound.h not included 15 | #endif // __DSOUND_INCLUDED__ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif // __cplusplus 20 | 21 | 22 | // DirectSound Private Component GUID {11AB3EC0-25EC-11d1-A4D8-00C04FC28ACA} 23 | DEFINE_GUID(CLSID_DirectSoundPrivate, 0x11ab3ec0, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); 24 | 25 | 26 | // 27 | // DirectSound Device Properties {84624F82-25EC-11d1-A4D8-00C04FC28ACA} 28 | // 29 | 30 | DEFINE_GUID(DSPROPSETID_DirectSoundDevice, 0x84624f82, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); 31 | 32 | typedef enum 33 | { 34 | DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A = 1, 35 | DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 = 2, 36 | DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 = 3, 37 | DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W = 4, 38 | DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A = 5, 39 | DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W = 6, 40 | DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A = 7, 41 | DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W = 8, 42 | } DSPROPERTY_DIRECTSOUNDDEVICE; 43 | 44 | #if DIRECTSOUND_VERSION >= 0x0700 45 | #ifdef UNICODE 46 | #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W 47 | #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W 48 | #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W 49 | #else // UNICODE 50 | #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A 51 | #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A 52 | #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A 53 | #endif // UNICODE 54 | #else // DIRECTSOUND_VERSION >= 0x0700 55 | #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A 56 | #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 57 | #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 58 | #endif // DIRECTSOUND_VERSION >= 0x0700 59 | 60 | typedef enum 61 | { 62 | DIRECTSOUNDDEVICE_TYPE_EMULATED, 63 | DIRECTSOUNDDEVICE_TYPE_VXD, 64 | DIRECTSOUNDDEVICE_TYPE_WDM 65 | } DIRECTSOUNDDEVICE_TYPE; 66 | 67 | typedef enum 68 | { 69 | DIRECTSOUNDDEVICE_DATAFLOW_RENDER, 70 | DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE 71 | } DIRECTSOUNDDEVICE_DATAFLOW; 72 | 73 | 74 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA 75 | { 76 | LPSTR DeviceName; // waveIn/waveOut device name 77 | DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Data flow (i.e. waveIn or waveOut) 78 | GUID DeviceId; // DirectSound device id 79 | } DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA; 80 | 81 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA 82 | { 83 | LPWSTR DeviceName; // waveIn/waveOut device name 84 | DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Data flow (i.e. waveIn or waveOut) 85 | GUID DeviceId; // DirectSound device id 86 | } DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA; 87 | 88 | #ifdef UNICODE 89 | #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA 90 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA 91 | #else // UNICODE 92 | #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA 93 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA 94 | #endif // UNICODE 95 | 96 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA 97 | { 98 | GUID DeviceId; // DirectSound device id 99 | CHAR DescriptionA[0x100]; // Device description (ANSI) 100 | WCHAR DescriptionW[0x100]; // Device description (Unicode) 101 | CHAR ModuleA[MAX_PATH]; // Device driver module (ANSI) 102 | WCHAR ModuleW[MAX_PATH]; // Device driver module (Unicode) 103 | DIRECTSOUNDDEVICE_TYPE Type; // Device type 104 | DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow 105 | ULONG WaveDeviceId; // Wave device id 106 | ULONG Devnode; // Devnode (or DevInst) 107 | } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA; 108 | 109 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA 110 | { 111 | DIRECTSOUNDDEVICE_TYPE Type; // Device type 112 | DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow 113 | GUID DeviceId; // DirectSound device id 114 | LPSTR Description; // Device description 115 | LPSTR Module; // Device driver module 116 | LPSTR Interface; // Device interface 117 | ULONG WaveDeviceId; // Wave device id 118 | } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA; 119 | 120 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA 121 | { 122 | DIRECTSOUNDDEVICE_TYPE Type; // Device type 123 | DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow 124 | GUID DeviceId; // DirectSound device id 125 | LPWSTR Description; // Device description 126 | LPWSTR Module; // Device driver module 127 | LPWSTR Interface; // Device interface 128 | ULONG WaveDeviceId; // Wave device id 129 | } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA; 130 | 131 | #if DIRECTSOUND_VERSION >= 0x0700 132 | #ifdef UNICODE 133 | #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA 134 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA 135 | #else // UNICODE 136 | #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA 137 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA 138 | #endif // UNICODE 139 | #else // DIRECTSOUND_VERSION >= 0x0700 140 | #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA 141 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA 142 | #endif // DIRECTSOUND_VERSION >= 0x0700 143 | 144 | typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, LPVOID); 145 | typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, LPVOID); 146 | typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, LPVOID); 147 | 148 | #if DIRECTSOUND_VERSION >= 0x0700 149 | #ifdef UNICODE 150 | #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW 151 | #else // UNICODE 152 | #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA 153 | #endif // UNICODE 154 | #else // DIRECTSOUND_VERSION >= 0x0700 155 | #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1 156 | #endif // DIRECTSOUND_VERSION >= 0x0700 157 | 158 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA 159 | { 160 | LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1 Callback; // Callback function pointer 161 | LPVOID Context; // Callback function context argument 162 | } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA; 163 | 164 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA 165 | { 166 | LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA Callback; // Callback function pointer 167 | LPVOID Context; // Callback function context argument 168 | } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA; 169 | 170 | typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA 171 | { 172 | LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW Callback; // Callback function pointer 173 | LPVOID Context; // Callback function context argument 174 | } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA; 175 | 176 | #if DIRECTSOUND_VERSION >= 0x0700 177 | #ifdef UNICODE 178 | #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA 179 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA 180 | #else // UNICODE 181 | #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA 182 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA 183 | #endif // UNICODE 184 | #else // DIRECTSOUND_VERSION >= 0x0700 185 | #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA 186 | #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA 187 | #endif // DIRECTSOUND_VERSION >= 0x0700 188 | 189 | 190 | #ifdef __cplusplus 191 | } 192 | #endif // __cplusplus 193 | 194 | #endif // __DSCONF_INCLUDED__ 195 | 196 | -------------------------------------------------------------------------------- /Include/xact3d3.h: -------------------------------------------------------------------------------- 1 | /*-========================================================================-_ 2 | | - XACT3D3 - | 3 | | Copyright (c) Microsoft Corporation. All rights reserved. | 4 | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 5 | |VERSION: 0.1 MODEL: Unmanaged User-mode | 6 | |CONTRACT: N / A EXCEPT: No Exceptions | 7 | |PARENT: N / A MINREQ: Win2000, Xbox360 | 8 | |PROJECT: XACT3D DIALECT: MS Visual C++ 7.0 | 9 | |>------------------------------------------------------------------------<| 10 | | DUTY: XACT 3D support | 11 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 12 | NOTES: 13 | 1. See X3DAudio.h for information regarding X3DAudio types. */ 14 | 15 | 16 | #ifndef __XACT3D3_H__ 17 | #define __XACT3D3_H__ 18 | 19 | //---------------------------------------------------// 20 | #include 21 | #include 22 | 23 | #pragma warning(push) 24 | #pragma warning(disable: 4701) // disable "local variable may be used without having been initialized" compile warning 25 | 26 | // Supported speaker positions, represented as azimuth angles. 27 | // 28 | // Here's a picture of the azimuth angles for the 8 cardinal points, 29 | // seen from above. The emitter's base position is at the origin 0. 30 | // 31 | // FRONT 32 | // | 0 <-- azimuth 33 | // | 34 | // 7pi/4 \ | / pi/4 35 | // \ | / 36 | // LEFT \|/ RIGHT 37 | // 3pi/2-------0-------pi/2 38 | // /|\ 39 | // / | \ 40 | // 5pi/4 / | \ 3pi/4 41 | // | 42 | // | pi 43 | // BACK 44 | // 45 | #define LEFT_AZIMUTH (3*X3DAUDIO_PI/2) 46 | #define RIGHT_AZIMUTH (X3DAUDIO_PI/2) 47 | #define FRONT_LEFT_AZIMUTH (7*X3DAUDIO_PI/4) 48 | #define FRONT_RIGHT_AZIMUTH (X3DAUDIO_PI/4) 49 | #define FRONT_CENTER_AZIMUTH 0.0f 50 | #define LOW_FREQUENCY_AZIMUTH X3DAUDIO_2PI 51 | #define BACK_LEFT_AZIMUTH (5*X3DAUDIO_PI/4) 52 | #define BACK_RIGHT_AZIMUTH (3*X3DAUDIO_PI/4) 53 | #define BACK_CENTER_AZIMUTH X3DAUDIO_PI 54 | #define FRONT_LEFT_OF_CENTER_AZIMUTH (15*X3DAUDIO_PI/8) 55 | #define FRONT_RIGHT_OF_CENTER_AZIMUTH (X3DAUDIO_PI/8) 56 | 57 | 58 | //-----------------------------------------------------// 59 | // Supported emitter channel layouts: 60 | static const float aStereoLayout[] = 61 | { 62 | LEFT_AZIMUTH, 63 | RIGHT_AZIMUTH 64 | }; 65 | static const float a2Point1Layout[] = 66 | { 67 | LEFT_AZIMUTH, 68 | RIGHT_AZIMUTH, 69 | LOW_FREQUENCY_AZIMUTH 70 | }; 71 | static const float aQuadLayout[] = 72 | { 73 | FRONT_LEFT_AZIMUTH, 74 | FRONT_RIGHT_AZIMUTH, 75 | BACK_LEFT_AZIMUTH, 76 | BACK_RIGHT_AZIMUTH 77 | }; 78 | static const float a4Point1Layout[] = 79 | { 80 | FRONT_LEFT_AZIMUTH, 81 | FRONT_RIGHT_AZIMUTH, 82 | LOW_FREQUENCY_AZIMUTH, 83 | BACK_LEFT_AZIMUTH, 84 | BACK_RIGHT_AZIMUTH 85 | }; 86 | static const float a5Point1Layout[] = 87 | { 88 | FRONT_LEFT_AZIMUTH, 89 | FRONT_RIGHT_AZIMUTH, 90 | FRONT_CENTER_AZIMUTH, 91 | LOW_FREQUENCY_AZIMUTH, 92 | BACK_LEFT_AZIMUTH, 93 | BACK_RIGHT_AZIMUTH 94 | }; 95 | static const float a7Point1Layout[] = 96 | { 97 | FRONT_LEFT_AZIMUTH, 98 | FRONT_RIGHT_AZIMUTH, 99 | FRONT_CENTER_AZIMUTH, 100 | LOW_FREQUENCY_AZIMUTH, 101 | BACK_LEFT_AZIMUTH, 102 | BACK_RIGHT_AZIMUTH, 103 | LEFT_AZIMUTH, 104 | RIGHT_AZIMUTH 105 | }; 106 | 107 | 108 | //-------------------------------------------------------// 109 | //// 110 | // DESCRIPTION: 111 | // Initializes the 3D API's: 112 | // 113 | // REMARKS: 114 | // This method only needs to be called once. 115 | // X3DAudio will be initialized such that its speaker channel mask 116 | // matches the format of the given XACT engine's final mix. 117 | // 118 | // PARAMETERS: 119 | // pEngine - [in] XACT engine 120 | // X3DInstance - [out] X3DAudio instance handle 121 | // 122 | // RETURN VALUE: 123 | // HResult error code 124 | //// 125 | EXTERN_C HRESULT inline XACT3DInitialize (__in IXACT3Engine* pEngine, __in X3DAUDIO_HANDLE X3DInstance) 126 | { 127 | HRESULT hr = S_OK; 128 | if (pEngine == NULL) { 129 | hr = E_POINTER; 130 | } 131 | 132 | XACTVARIABLEVALUE nSpeedOfSound; 133 | if (SUCCEEDED(hr)) { 134 | XACTVARIABLEINDEX xactSpeedOfSoundID = pEngine->GetGlobalVariableIndex("SpeedOfSound"); 135 | hr = pEngine->GetGlobalVariable(xactSpeedOfSoundID, &nSpeedOfSound); 136 | } 137 | 138 | if (SUCCEEDED(hr)) { 139 | WAVEFORMATEXTENSIBLE wfxFinalMixFormat; 140 | hr = pEngine->GetFinalMixFormat(&wfxFinalMixFormat); 141 | if (SUCCEEDED(hr)) { 142 | X3DAudioInitialize(wfxFinalMixFormat.dwChannelMask, nSpeedOfSound, X3DInstance); 143 | } 144 | } 145 | return hr; 146 | } 147 | 148 | 149 | //// 150 | // DESCRIPTION: 151 | // Calculates DSP settings with respect to 3D parameters: 152 | // 153 | // REMARKS: 154 | // Note the following flags are always specified for XACT3D calculation: 155 | // X3DAUDIO_CALCULATE_MATRIX | X3DAUDIO_CALCULATE_DOPPLER | X3DAUDIO_CALCULATE_EMITTER_ANGLE 156 | // 157 | // This means the caller must set at least the following fields: 158 | // X3DAUDIO_LISTENER.OrientFront 159 | // X3DAUDIO_LISTENER.OrientTop 160 | // X3DAUDIO_LISTENER.Position 161 | // X3DAUDIO_LISTENER.Velocity 162 | // 163 | // X3DAUDIO_EMITTER.OrientFront 164 | // X3DAUDIO_EMITTER.OrientTop, if emitter is multi-channel 165 | // X3DAUDIO_EMITTER.Position 166 | // X3DAUDIO_EMITTER.Velocity 167 | // X3DAUDIO_EMITTER.InnerRadius 168 | // X3DAUDIO_EMITTER.InnerRadiusAngle 169 | // X3DAUDIO_EMITTER.ChannelCount 170 | // X3DAUDIO_EMITTER.CurveDistanceScaler 171 | // X3DAUDIO_EMITTER.DopplerScaler 172 | // 173 | // X3DAUDIO_DSP_SETTINGS.pMatrixCoefficients, the caller need only allocate space for SrcChannelCount*DstChannelCount elements 174 | // X3DAUDIO_DSP_SETTINGS.SrcChannelCount 175 | // X3DAUDIO_DSP_SETTINGS.DstChannelCount 176 | // 177 | // If X3DAUDIO_EMITTER.pChannelAzimuths is left NULL for multi-channel emitters, 178 | // a default channel radius and channel azimuth array will be applied below. 179 | // Distance curves such as X3DAUDIO_EMITTER.pVolumeCurve should be 180 | // left NULL as XACT's native RPCs will be used to define DSP behaviour 181 | // with respect to normalized distance. 182 | // 183 | // See X3DAudio.h for information regarding X3DAudio types. 184 | // 185 | // PARAMETERS: 186 | // X3DInstance - [in] X3DAudio instance handle, returned from XACT3DInitialize() 187 | // pListener - [in] point of 3D audio reception 188 | // pEmitter - [in] 3D audio source 189 | // pDSPSettings - [out] receives calculation results, applied to an XACT cue via XACT3DApply() 190 | // 191 | // RETURN VALUE: 192 | // HResult error code 193 | //// 194 | EXTERN_C HRESULT inline XACT3DCalculate (__in X3DAUDIO_HANDLE X3DInstance, __in const X3DAUDIO_LISTENER* pListener, __inout X3DAUDIO_EMITTER* pEmitter, __inout X3DAUDIO_DSP_SETTINGS* pDSPSettings) 195 | { 196 | HRESULT hr = S_OK; 197 | if (pListener == NULL || pEmitter == NULL || pDSPSettings == NULL) { 198 | hr = E_POINTER; 199 | } 200 | 201 | if (SUCCEEDED(hr)) { 202 | if (pEmitter->ChannelCount > 1 && pEmitter->pChannelAzimuths == NULL) { 203 | pEmitter->ChannelRadius = 1.0f; 204 | 205 | switch (pEmitter->ChannelCount) { 206 | case 2: pEmitter->pChannelAzimuths = (float*)&aStereoLayout[0]; break; 207 | case 3: pEmitter->pChannelAzimuths = (float*)&a2Point1Layout[0]; break; 208 | case 4: pEmitter->pChannelAzimuths = (float*)&aQuadLayout[0]; break; 209 | case 5: pEmitter->pChannelAzimuths = (float*)&a4Point1Layout[0]; break; 210 | case 6: pEmitter->pChannelAzimuths = (float*)&a5Point1Layout[0]; break; 211 | case 8: pEmitter->pChannelAzimuths = (float*)&a7Point1Layout[0]; break; 212 | default: hr = E_FAIL; break; 213 | } 214 | } 215 | } 216 | 217 | if (SUCCEEDED(hr)) { 218 | static X3DAUDIO_DISTANCE_CURVE_POINT DefaultCurvePoints[2] = { 0.0f, 1.0f, 1.0f, 1.0f }; 219 | static X3DAUDIO_DISTANCE_CURVE DefaultCurve = { (X3DAUDIO_DISTANCE_CURVE_POINT*)&DefaultCurvePoints[0], 2 }; 220 | if (pEmitter->pVolumeCurve == NULL) { 221 | pEmitter->pVolumeCurve = &DefaultCurve; 222 | } 223 | if (pEmitter->pLFECurve == NULL) { 224 | pEmitter->pLFECurve = &DefaultCurve; 225 | } 226 | 227 | X3DAudioCalculate(X3DInstance, pListener, pEmitter, (X3DAUDIO_CALCULATE_MATRIX | X3DAUDIO_CALCULATE_DOPPLER | X3DAUDIO_CALCULATE_EMITTER_ANGLE), pDSPSettings); 228 | } 229 | 230 | return hr; 231 | } 232 | 233 | 234 | //// 235 | // DESCRIPTION: 236 | // Applies results from a call to XACT3DCalculate() to a cue. 237 | // 238 | // PARAMETERS: 239 | // pDSPSettings - [in] calculation results generated by XACT3DCalculate() 240 | // pCue - [in] cue to which to apply pDSPSettings 241 | // 242 | // RETURN VALUE: 243 | // HResult error code 244 | //// 245 | EXTERN_C HRESULT inline XACT3DApply (__in const X3DAUDIO_DSP_SETTINGS* pDSPSettings, __in IXACT3Cue* pCue) 246 | { 247 | HRESULT hr = S_OK; 248 | if (pDSPSettings == NULL || pCue == NULL) { 249 | hr = E_POINTER; 250 | } 251 | 252 | if (SUCCEEDED(hr)) { 253 | hr = pCue->SetMatrixCoefficients(pDSPSettings->SrcChannelCount, pDSPSettings->DstChannelCount, pDSPSettings->pMatrixCoefficients); 254 | } 255 | if (SUCCEEDED(hr)) { 256 | XACTVARIABLEINDEX xactDistanceID = pCue->GetVariableIndex("Distance"); 257 | hr = pCue->SetVariable(xactDistanceID, pDSPSettings->EmitterToListenerDistance); 258 | } 259 | if (SUCCEEDED(hr)) { 260 | XACTVARIABLEINDEX xactDopplerID = pCue->GetVariableIndex("DopplerPitchScalar"); 261 | hr = pCue->SetVariable(xactDopplerID, pDSPSettings->DopplerFactor); 262 | } 263 | if (SUCCEEDED(hr)) { 264 | XACTVARIABLEINDEX xactOrientationID = pCue->GetVariableIndex("OrientationAngle"); 265 | hr = pCue->SetVariable(xactOrientationID, pDSPSettings->EmitterToListenerAngle * (180.0f / X3DAUDIO_PI)); 266 | } 267 | 268 | return hr; 269 | } 270 | 271 | 272 | #pragma warning(pop) 273 | 274 | #endif // __XACT3D3_H__ 275 | //---------------------------------<-EOF->----------------------------------// 276 | -------------------------------------------------------------------------------- /Include/audiodefs.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * Copyright (c) Microsoft Corporation. All rights reserved. 4 | * 5 | * File: audiodefs.h 6 | * Content: Basic constants and data types for audio work. 7 | * 8 | * Remarks: This header file defines all of the audio format constants and 9 | * structures required for XAudio2 and XACT work. Providing these 10 | * in a single location avoids certain dependency problems in the 11 | * legacy audio headers (mmreg.h, mmsystem.h, ksmedia.h). 12 | * 13 | * NOTE: Including the legacy headers after this one may cause a 14 | * compilation error, because they define some of the same types 15 | * defined here without preprocessor guards to avoid multiple 16 | * definitions. If a source file needs one of the old headers, 17 | * it must include it before including audiodefs.h. 18 | * 19 | ***************************************************************************/ 20 | 21 | #ifndef __AUDIODEFS_INCLUDED__ 22 | #define __AUDIODEFS_INCLUDED__ 23 | 24 | #include // For WORD, DWORD, etc. 25 | 26 | #pragma pack(push, 1) // Pack structures to 1-byte boundaries 27 | 28 | 29 | /************************************************************************** 30 | * 31 | * WAVEFORMATEX: Base structure for many audio formats. Format-specific 32 | * extensions can be defined for particular formats by using a non-zero 33 | * cbSize value and adding extra fields to the end of this structure. 34 | * 35 | ***************************************************************************/ 36 | 37 | #ifndef _WAVEFORMATEX_ 38 | 39 | #define _WAVEFORMATEX_ 40 | typedef struct tWAVEFORMATEX 41 | { 42 | WORD wFormatTag; // Integer identifier of the format 43 | WORD nChannels; // Number of audio channels 44 | DWORD nSamplesPerSec; // Audio sample rate 45 | DWORD nAvgBytesPerSec; // Bytes per second (possibly approximate) 46 | WORD nBlockAlign; // Size in bytes of a sample block (all channels) 47 | WORD wBitsPerSample; // Size in bits of a single per-channel sample 48 | WORD cbSize; // Bytes of extra data appended to this struct 49 | } WAVEFORMATEX; 50 | 51 | #endif 52 | 53 | // Defining pointer types outside of the #if block to make sure they are 54 | // defined even if mmreg.h or mmsystem.h is #included before this file 55 | 56 | typedef WAVEFORMATEX *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX; 57 | typedef const WAVEFORMATEX *PCWAVEFORMATEX, *LPCWAVEFORMATEX; 58 | 59 | 60 | /************************************************************************** 61 | * 62 | * WAVEFORMATEXTENSIBLE: Extended version of WAVEFORMATEX that should be 63 | * used as a basis for all new audio formats. The format tag is replaced 64 | * with a GUID, allowing new formats to be defined without registering a 65 | * format tag with Microsoft. There are also new fields that can be used 66 | * to specify the spatial positions for each channel and the bit packing 67 | * used for wide samples (e.g. 24-bit PCM samples in 32-bit containers). 68 | * 69 | ***************************************************************************/ 70 | 71 | #ifndef _WAVEFORMATEXTENSIBLE_ 72 | 73 | #define _WAVEFORMATEXTENSIBLE_ 74 | typedef struct 75 | { 76 | WAVEFORMATEX Format; // Base WAVEFORMATEX data 77 | union 78 | { 79 | WORD wValidBitsPerSample; // Valid bits in each sample container 80 | WORD wSamplesPerBlock; // Samples per block of audio data; valid 81 | // if wBitsPerSample=0 (but rarely used). 82 | WORD wReserved; // Zero if neither case above applies. 83 | } Samples; 84 | DWORD dwChannelMask; // Positions of the audio channels 85 | GUID SubFormat; // Format identifier GUID 86 | } WAVEFORMATEXTENSIBLE; 87 | 88 | #endif 89 | 90 | typedef WAVEFORMATEXTENSIBLE *PWAVEFORMATEXTENSIBLE, *LPWAVEFORMATEXTENSIBLE; 91 | typedef const WAVEFORMATEXTENSIBLE *PCWAVEFORMATEXTENSIBLE, *LPCWAVEFORMATEXTENSIBLE; 92 | 93 | 94 | 95 | /************************************************************************** 96 | * 97 | * Define the most common wave format tags used in WAVEFORMATEX formats. 98 | * 99 | ***************************************************************************/ 100 | 101 | #ifndef WAVE_FORMAT_PCM // Pulse Code Modulation 102 | 103 | // If WAVE_FORMAT_PCM is not defined, we need to define some legacy types 104 | // for compatibility with the Windows mmreg.h / mmsystem.h header files. 105 | 106 | // Old general format structure (information common to all formats) 107 | typedef struct waveformat_tag 108 | { 109 | WORD wFormatTag; 110 | WORD nChannels; 111 | DWORD nSamplesPerSec; 112 | DWORD nAvgBytesPerSec; 113 | WORD nBlockAlign; 114 | } WAVEFORMAT, *PWAVEFORMAT, NEAR *NPWAVEFORMAT, FAR *LPWAVEFORMAT; 115 | 116 | // Specific format structure for PCM data 117 | typedef struct pcmwaveformat_tag 118 | { 119 | WAVEFORMAT wf; 120 | WORD wBitsPerSample; 121 | } PCMWAVEFORMAT, *PPCMWAVEFORMAT, NEAR *NPPCMWAVEFORMAT, FAR *LPPCMWAVEFORMAT; 122 | 123 | #define WAVE_FORMAT_PCM 0x0001 124 | 125 | #endif 126 | 127 | #ifndef WAVE_FORMAT_ADPCM // Microsoft Adaptive Differental PCM 128 | 129 | // Replicate the Microsoft ADPCM type definitions from mmreg.h. 130 | 131 | typedef struct adpcmcoef_tag 132 | { 133 | short iCoef1; 134 | short iCoef2; 135 | } ADPCMCOEFSET; 136 | 137 | #pragma warning(push) 138 | #pragma warning(disable:4200) // Disable zero-sized array warnings 139 | 140 | typedef struct adpcmwaveformat_tag { 141 | WAVEFORMATEX wfx; 142 | WORD wSamplesPerBlock; 143 | WORD wNumCoef; 144 | ADPCMCOEFSET aCoef[]; // Always 7 coefficient pairs for MS ADPCM 145 | } ADPCMWAVEFORMAT; 146 | 147 | #pragma warning(pop) 148 | 149 | #define WAVE_FORMAT_ADPCM 0x0002 150 | 151 | #endif 152 | 153 | // Other frequently used format tags 154 | 155 | #ifndef WAVE_FORMAT_UNKNOWN 156 | #define WAVE_FORMAT_UNKNOWN 0x0000 // Unknown or invalid format tag 157 | #endif 158 | 159 | #ifndef WAVE_FORMAT_IEEE_FLOAT 160 | #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point 161 | #endif 162 | 163 | #ifndef WAVE_FORMAT_MPEGLAYER3 164 | #define WAVE_FORMAT_MPEGLAYER3 0x0055 // ISO/MPEG Layer3 165 | #endif 166 | 167 | #ifndef WAVE_FORMAT_DOLBY_AC3_SPDIF 168 | #define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092 // Dolby Audio Codec 3 over S/PDIF 169 | #endif 170 | 171 | #ifndef WAVE_FORMAT_WMAUDIO2 172 | #define WAVE_FORMAT_WMAUDIO2 0x0161 // Windows Media Audio 173 | #endif 174 | 175 | #ifndef WAVE_FORMAT_WMAUDIO3 176 | #define WAVE_FORMAT_WMAUDIO3 0x0162 // Windows Media Audio Pro 177 | #endif 178 | 179 | #ifndef WAVE_FORMAT_WMASPDIF 180 | #define WAVE_FORMAT_WMASPDIF 0x0164 // Windows Media Audio over S/PDIF 181 | #endif 182 | 183 | #ifndef WAVE_FORMAT_EXTENSIBLE 184 | #define WAVE_FORMAT_EXTENSIBLE 0xFFFE // All WAVEFORMATEXTENSIBLE formats 185 | #endif 186 | 187 | 188 | /************************************************************************** 189 | * 190 | * Define the most common wave format GUIDs used in WAVEFORMATEXTENSIBLE 191 | * formats. Note that including the Windows ksmedia.h header after this 192 | * one will cause build problems; this cannot be avoided, since ksmedia.h 193 | * defines these macros without preprocessor guards. 194 | * 195 | ***************************************************************************/ 196 | 197 | #ifdef __cplusplus // uuid() and __uuidof() are only available in C++ 198 | 199 | #ifndef KSDATAFORMAT_SUBTYPE_PCM 200 | struct __declspec(uuid("00000001-0000-0010-8000-00aa00389b71")) KSDATAFORMAT_SUBTYPE_PCM_STRUCT; 201 | #define KSDATAFORMAT_SUBTYPE_PCM __uuidof(KSDATAFORMAT_SUBTYPE_PCM_STRUCT) 202 | #endif 203 | 204 | #ifndef KSDATAFORMAT_SUBTYPE_ADPCM 205 | struct __declspec(uuid("00000002-0000-0010-8000-00aa00389b71")) KSDATAFORMAT_SUBTYPE_ADPCM_STRUCT; 206 | #define KSDATAFORMAT_SUBTYPE_ADPCM __uuidof(KSDATAFORMAT_SUBTYPE_ADPCM_STRUCT) 207 | #endif 208 | 209 | #ifndef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT 210 | struct __declspec(uuid("00000003-0000-0010-8000-00aa00389b71")) KSDATAFORMAT_SUBTYPE_IEEE_FLOAT_STRUCT; 211 | #define KSDATAFORMAT_SUBTYPE_IEEE_FLOAT __uuidof(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT_STRUCT) 212 | #endif 213 | 214 | #endif 215 | 216 | 217 | /************************************************************************** 218 | * 219 | * Speaker positions used in the WAVEFORMATEXTENSIBLE dwChannelMask field. 220 | * 221 | ***************************************************************************/ 222 | 223 | #ifndef SPEAKER_FRONT_LEFT 224 | #define SPEAKER_FRONT_LEFT 0x00000001 225 | #define SPEAKER_FRONT_RIGHT 0x00000002 226 | #define SPEAKER_FRONT_CENTER 0x00000004 227 | #define SPEAKER_LOW_FREQUENCY 0x00000008 228 | #define SPEAKER_BACK_LEFT 0x00000010 229 | #define SPEAKER_BACK_RIGHT 0x00000020 230 | #define SPEAKER_FRONT_LEFT_OF_CENTER 0x00000040 231 | #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x00000080 232 | #define SPEAKER_BACK_CENTER 0x00000100 233 | #define SPEAKER_SIDE_LEFT 0x00000200 234 | #define SPEAKER_SIDE_RIGHT 0x00000400 235 | #define SPEAKER_TOP_CENTER 0x00000800 236 | #define SPEAKER_TOP_FRONT_LEFT 0x00001000 237 | #define SPEAKER_TOP_FRONT_CENTER 0x00002000 238 | #define SPEAKER_TOP_FRONT_RIGHT 0x00004000 239 | #define SPEAKER_TOP_BACK_LEFT 0x00008000 240 | #define SPEAKER_TOP_BACK_CENTER 0x00010000 241 | #define SPEAKER_TOP_BACK_RIGHT 0x00020000 242 | #define SPEAKER_RESERVED 0x7FFC0000 243 | #define SPEAKER_ALL 0x80000000 244 | #define _SPEAKER_POSITIONS_ 245 | #endif 246 | 247 | #ifndef SPEAKER_STEREO 248 | #define SPEAKER_MONO (SPEAKER_FRONT_CENTER) 249 | #define SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT) 250 | #define SPEAKER_2POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY) 251 | #define SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER) 252 | #define SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) 253 | #define SPEAKER_4POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) 254 | #define SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) 255 | #define SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER) 256 | #define SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT) 257 | #define SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT) 258 | #endif 259 | 260 | 261 | #pragma pack(pop) 262 | 263 | #endif // #ifndef __AUDIODEFS_INCLUDED__ 264 | -------------------------------------------------------------------------------- /Include/D3DX10mesh.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx10mesh.h 6 | // Content: D3DX10 mesh types and functions 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx10.h" 11 | 12 | #ifndef __D3DX10MESH_H__ 13 | #define __D3DX10MESH_H__ 14 | 15 | // {7ED943DD-52E8-40b5-A8D8-76685C406330} 16 | DEFINE_GUID(IID_ID3DX10BaseMesh, 17 | 0x7ed943dd, 0x52e8, 0x40b5, 0xa8, 0xd8, 0x76, 0x68, 0x5c, 0x40, 0x63, 0x30); 18 | 19 | // {04B0D117-1041-46b1-AA8A-3952848BA22E} 20 | DEFINE_GUID(IID_ID3DX10MeshBuffer, 21 | 0x4b0d117, 0x1041, 0x46b1, 0xaa, 0x8a, 0x39, 0x52, 0x84, 0x8b, 0xa2, 0x2e); 22 | 23 | // {4020E5C2-1403-4929-883F-E2E849FAC195} 24 | DEFINE_GUID(IID_ID3DX10Mesh, 25 | 0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95); 26 | 27 | // {8875769A-D579-4088-AAEB-534D1AD84E96} 28 | DEFINE_GUID(IID_ID3DX10PMesh, 29 | 0x8875769a, 0xd579, 0x4088, 0xaa, 0xeb, 0x53, 0x4d, 0x1a, 0xd8, 0x4e, 0x96); 30 | 31 | // {667EA4C7-F1CD-4386-B523-7C0290B83CC5} 32 | DEFINE_GUID(IID_ID3DX10SPMesh, 33 | 0x667ea4c7, 0xf1cd, 0x4386, 0xb5, 0x23, 0x7c, 0x2, 0x90, 0xb8, 0x3c, 0xc5); 34 | 35 | // {3CE6CC22-DBF2-44f4-894D-F9C34A337139} 36 | DEFINE_GUID(IID_ID3DX10PatchMesh, 37 | 0x3ce6cc22, 0xdbf2, 0x44f4, 0x89, 0x4d, 0xf9, 0xc3, 0x4a, 0x33, 0x71, 0x39); 38 | 39 | 40 | // Mesh options - lower 3 bytes only, upper byte used by _D3DX10MESHOPT option flags 41 | enum _D3DX10_MESH { 42 | D3DX10_MESH_32_BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. 43 | D3DX10_MESH_GS_ADJACENCY = 0x004, // If set, mesh contains GS adjacency info. Not valid on input. 44 | 45 | }; 46 | 47 | typedef struct _D3DX10_ATTRIBUTE_RANGE 48 | { 49 | UINT AttribId; 50 | UINT FaceStart; 51 | UINT FaceCount; 52 | UINT VertexStart; 53 | UINT VertexCount; 54 | } D3DX10_ATTRIBUTE_RANGE; 55 | 56 | typedef D3DX10_ATTRIBUTE_RANGE* LPD3DX10_ATTRIBUTE_RANGE; 57 | 58 | typedef enum _D3DX10_MESH_DISCARD_FLAGS 59 | { 60 | D3DX10_MESH_DISCARD_ATTRIBUTE_BUFFER = 0x01, 61 | D3DX10_MESH_DISCARD_ATTRIBUTE_TABLE = 0x02, 62 | D3DX10_MESH_DISCARD_POINTREPS = 0x04, 63 | D3DX10_MESH_DISCARD_ADJACENCY = 0x08, 64 | D3DX10_MESH_DISCARD_DEVICE_BUFFERS = 0x10, 65 | 66 | } D3DX10_MESH_DISCARD_FLAGS; 67 | 68 | typedef struct _D3DX10_WELD_EPSILONS 69 | { 70 | FLOAT Position; // NOTE: This does NOT replace the epsilon in GenerateAdjacency 71 | // in general, it should be the same value or greater than the one passed to GeneratedAdjacency 72 | FLOAT BlendWeights; 73 | FLOAT Normal; 74 | FLOAT PSize; 75 | FLOAT Specular; 76 | FLOAT Diffuse; 77 | FLOAT Texcoord[8]; 78 | FLOAT Tangent; 79 | FLOAT Binormal; 80 | FLOAT TessFactor; 81 | } D3DX10_WELD_EPSILONS; 82 | 83 | typedef D3DX10_WELD_EPSILONS* LPD3DX10_WELD_EPSILONS; 84 | 85 | typedef struct _D3DX10_INTERSECT_INFO 86 | { 87 | UINT FaceIndex; // index of face intersected 88 | FLOAT U; // Barycentric Hit Coordinates 89 | FLOAT V; // Barycentric Hit Coordinates 90 | FLOAT Dist; // Ray-Intersection Parameter Distance 91 | } D3DX10_INTERSECT_INFO, *LPD3DX10_INTERSECT_INFO; 92 | 93 | // ID3DX10MeshBuffer is used by D3DX10Mesh vertex and index buffers 94 | #undef INTERFACE 95 | #define INTERFACE ID3DX10MeshBuffer 96 | 97 | DECLARE_INTERFACE_(ID3DX10MeshBuffer, IUnknown) 98 | { 99 | // IUnknown 100 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 101 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 102 | STDMETHOD_(ULONG, Release)(THIS) PURE; 103 | 104 | // ID3DX10MeshBuffer 105 | STDMETHOD(Map)(THIS_ void **ppData, SIZE_T *pSize) PURE; 106 | STDMETHOD(Unmap)(THIS) PURE; 107 | STDMETHOD_(SIZE_T, GetSize)(THIS) PURE; 108 | }; 109 | 110 | // D3DX10 Mesh interfaces 111 | #undef INTERFACE 112 | #define INTERFACE ID3DX10Mesh 113 | 114 | DECLARE_INTERFACE_(ID3DX10Mesh, IUnknown) 115 | { 116 | // IUnknown 117 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 118 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 119 | STDMETHOD_(ULONG, Release)(THIS) PURE; 120 | 121 | // ID3DX10Mesh 122 | STDMETHOD_(UINT, GetFaceCount)(THIS) PURE; 123 | STDMETHOD_(UINT, GetVertexCount)(THIS) PURE; 124 | STDMETHOD_(UINT, GetVertexBufferCount)(THIS) PURE; 125 | STDMETHOD_(UINT, GetFlags)(THIS) PURE; 126 | STDMETHOD(GetVertexDescription)(THIS_ CONST D3D10_INPUT_ELEMENT_DESC **ppDesc, UINT *pDeclCount) PURE; 127 | 128 | STDMETHOD(SetVertexData)(THIS_ UINT iBuffer, CONST void *pData) PURE; 129 | STDMETHOD(GetVertexBuffer)(THIS_ UINT iBuffer, ID3DX10MeshBuffer **ppVertexBuffer) PURE; 130 | 131 | STDMETHOD(SetIndexData)(THIS_ CONST void *pData, UINT cIndices) PURE; 132 | STDMETHOD(GetIndexBuffer)(THIS_ ID3DX10MeshBuffer **ppIndexBuffer) PURE; 133 | 134 | STDMETHOD(SetAttributeData)(THIS_ CONST UINT *pData) PURE; 135 | STDMETHOD(GetAttributeBuffer)(THIS_ ID3DX10MeshBuffer **ppAttributeBuffer) PURE; 136 | 137 | STDMETHOD(SetAttributeTable)(THIS_ CONST D3DX10_ATTRIBUTE_RANGE *pAttribTable, UINT cAttribTableSize) PURE; 138 | STDMETHOD(GetAttributeTable)(THIS_ D3DX10_ATTRIBUTE_RANGE *pAttribTable, UINT *pAttribTableSize) PURE; 139 | 140 | STDMETHOD(GenerateAdjacencyAndPointReps)(THIS_ FLOAT Epsilon) PURE; 141 | STDMETHOD(GenerateGSAdjacency)(THIS) PURE; 142 | 143 | STDMETHOD(SetAdjacencyData)(THIS_ CONST UINT *pAdjacency) PURE; 144 | STDMETHOD(GetAdjacencyBuffer)(THIS_ ID3DX10MeshBuffer **ppAdjacency) PURE; 145 | 146 | STDMETHOD(SetPointRepData)(THIS_ CONST UINT *pPointReps) PURE; 147 | STDMETHOD(GetPointRepBuffer)(THIS_ ID3DX10MeshBuffer **ppPointReps) PURE; 148 | 149 | STDMETHOD(Discard)(THIS_ D3DX10_MESH_DISCARD_FLAGS dwDiscard) PURE; 150 | STDMETHOD(CloneMesh)(THIS_ UINT Flags, LPCSTR pPosSemantic, CONST D3D10_INPUT_ELEMENT_DESC *pDesc, UINT DeclCount, ID3DX10Mesh** ppCloneMesh) PURE; 151 | 152 | STDMETHOD(Optimize)(THIS_ UINT Flags, UINT * pFaceRemap, LPD3D10BLOB *ppVertexRemap) PURE; 153 | STDMETHOD(GenerateAttributeBufferFromTable)(THIS) PURE; 154 | 155 | STDMETHOD(Intersect)(THIS_ D3DXVECTOR3 *pRayPos, D3DXVECTOR3 *pRayDir, 156 | UINT *pHitCount, UINT *pFaceIndex, float *pU, float *pV, float *pDist, ID3D10Blob **ppAllHits); 157 | STDMETHOD(IntersectSubset)(THIS_ UINT AttribId, D3DXVECTOR3 *pRayPos, D3DXVECTOR3 *pRayDir, 158 | UINT *pHitCount, UINT *pFaceIndex, float *pU, float *pV, float *pDist, ID3D10Blob **ppAllHits); 159 | 160 | // ID3DX10Mesh - Device functions 161 | STDMETHOD(CommitToDevice)(THIS) PURE; 162 | STDMETHOD(DrawSubset)(THIS_ UINT AttribId) PURE; 163 | STDMETHOD(DrawSubsetInstanced)(THIS_ UINT AttribId, UINT InstanceCount, UINT StartInstanceLocation) PURE; 164 | 165 | STDMETHOD(GetDeviceVertexBuffer)(THIS_ UINT iBuffer, ID3D10Buffer **ppVertexBuffer) PURE; 166 | STDMETHOD(GetDeviceIndexBuffer)(THIS_ ID3D10Buffer **ppIndexBuffer) PURE; 167 | }; 168 | 169 | 170 | // Flat API 171 | #ifdef __cplusplus 172 | extern "C" { 173 | #endif //__cplusplus 174 | 175 | HRESULT WINAPI 176 | D3DX10CreateMesh( 177 | ID3D10Device *pDevice, 178 | CONST D3D10_INPUT_ELEMENT_DESC *pDeclaration, 179 | UINT DeclCount, 180 | LPCSTR pPositionSemantic, 181 | UINT VertexCount, 182 | UINT FaceCount, 183 | UINT Options, 184 | ID3DX10Mesh **ppMesh); 185 | 186 | #ifdef __cplusplus 187 | } 188 | #endif //__cplusplus 189 | 190 | 191 | // ID3DX10Mesh::Optimize options - upper byte only, lower 3 bytes used from _D3DX10MESH option flags 192 | enum _D3DX10_MESHOPT { 193 | D3DX10_MESHOPT_COMPACT = 0x01000000, 194 | D3DX10_MESHOPT_ATTR_SORT = 0x02000000, 195 | D3DX10_MESHOPT_VERTEX_CACHE = 0x04000000, 196 | D3DX10_MESHOPT_STRIP_REORDER = 0x08000000, 197 | D3DX10_MESHOPT_IGNORE_VERTS = 0x10000000, // optimize faces only, don't touch vertices 198 | D3DX10_MESHOPT_DO_NOT_SPLIT = 0x20000000, // do not split vertices shared between attribute groups when attribute sorting 199 | D3DX10_MESHOPT_DEVICE_INDEPENDENT = 0x00400000, // Only affects VCache. uses a static known good cache size for all cards 200 | 201 | // D3DX10_MESHOPT_SHAREVB has been removed, please use D3DX10MESH_VB_SHARE instead 202 | 203 | }; 204 | 205 | 206 | ////////////////////////////////////////////////////////////////////////// 207 | // ID3DXSkinInfo 208 | ////////////////////////////////////////////////////////////////////////// 209 | 210 | // {420BD604-1C76-4a34-A466-E45D0658A32C} 211 | DEFINE_GUID(IID_ID3DX10SkinInfo, 212 | 0x420bd604, 0x1c76, 0x4a34, 0xa4, 0x66, 0xe4, 0x5d, 0x6, 0x58, 0xa3, 0x2c); 213 | 214 | // scaling modes for ID3DX10SkinInfo::Compact() & ID3DX10SkinInfo::UpdateMesh() 215 | #define D3DX10_SKININFO_NO_SCALING 0 216 | #define D3DX10_SKININFO_SCALE_TO_1 1 217 | #define D3DX10_SKININFO_SCALE_TO_TOTAL 2 218 | 219 | typedef struct _D3DX10_SKINNING_CHANNEL 220 | { 221 | UINT SrcOffset; 222 | UINT DestOffset; 223 | BOOL IsNormal; 224 | } D3DX10_SKINNING_CHANNEL; 225 | 226 | #undef INTERFACE 227 | #define INTERFACE ID3DX10SkinInfo 228 | 229 | typedef struct ID3DX10SkinInfo *LPD3DX10SKININFO; 230 | 231 | DECLARE_INTERFACE_(ID3DX10SkinInfo, IUnknown) 232 | { 233 | // IUnknown 234 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 235 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 236 | STDMETHOD_(ULONG, Release)(THIS) PURE; 237 | 238 | STDMETHOD_(UINT , GetNumVertices)(THIS) PURE; 239 | STDMETHOD_(UINT , GetNumBones)(THIS) PURE; 240 | STDMETHOD_(UINT , GetMaxBoneInfluences)(THIS) PURE; 241 | 242 | STDMETHOD(AddVertices)(THIS_ UINT Count) PURE; 243 | STDMETHOD(RemapVertices)(THIS_ UINT NewVertexCount, UINT *pVertexRemap) PURE; 244 | 245 | STDMETHOD(AddBones)(THIS_ UINT Count) PURE; 246 | STDMETHOD(RemoveBone)(THIS_ UINT Index) PURE; 247 | STDMETHOD(RemapBones)(THIS_ UINT NewBoneCount, UINT *pBoneRemap) PURE; 248 | 249 | STDMETHOD(AddBoneInfluences)(THIS_ UINT BoneIndex, UINT InfluenceCount, UINT *pIndices, float *pWeights) PURE; 250 | STDMETHOD(ClearBoneInfluences)(THIS_ UINT BoneIndex) PURE; 251 | STDMETHOD_(UINT , GetBoneInfluenceCount)(THIS_ UINT BoneIndex) PURE; 252 | STDMETHOD(GetBoneInfluences)(THIS_ UINT BoneIndex, UINT Offset, UINT Count, UINT *pDestIndices, float *pDestWeights) PURE; 253 | STDMETHOD(FindBoneInfluenceIndex)(THIS_ UINT BoneIndex, UINT VertexIndex, UINT *pInfluenceIndex) PURE; 254 | STDMETHOD(SetBoneInfluence)(THIS_ UINT BoneIndex, UINT InfluenceIndex, float Weight) PURE; 255 | STDMETHOD(GetBoneInfluence)(THIS_ UINT BoneIndex, UINT InfluenceIndex, float *pWeight) PURE; 256 | 257 | STDMETHOD(Compact)(THIS_ UINT MaxPerVertexInfluences, UINT ScaleMode, float MinWeight) PURE; 258 | STDMETHOD(DoSoftwareSkinning)(UINT StartVertex, UINT VertexCount, void *pSrcVertices, UINT SrcStride, void *pDestVertices, UINT DestStride, D3DXMATRIX *pBoneMatrices, D3DXMATRIX *pInverseTransposeBoneMatrices, D3DX10_SKINNING_CHANNEL *pChannelDescs, UINT NumChannels) PURE; 259 | }; 260 | 261 | #ifdef __cplusplus 262 | extern "C" { 263 | #endif //__cplusplus 264 | 265 | HRESULT WINAPI 266 | D3DX10CreateSkinInfo(LPD3DX10SKININFO* ppSkinInfo); 267 | 268 | #ifdef __cplusplus 269 | } 270 | #endif //__cplusplus 271 | 272 | typedef struct _D3DX10_ATTRIBUTE_WEIGHTS 273 | { 274 | FLOAT Position; 275 | FLOAT Boundary; 276 | FLOAT Normal; 277 | FLOAT Diffuse; 278 | FLOAT Specular; 279 | FLOAT Texcoord[8]; 280 | FLOAT Tangent; 281 | FLOAT Binormal; 282 | } D3DX10_ATTRIBUTE_WEIGHTS, *LPD3DX10_ATTRIBUTE_WEIGHTS; 283 | 284 | #endif //__D3DX10MESH_H__ 285 | 286 | 287 | -------------------------------------------------------------------------------- /Include/d3dx9xof.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx9xof.h 6 | // Content: D3DX .X File types and functions 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "d3dx9.h" 11 | 12 | #if !defined( __D3DX9XOF_H__ ) 13 | #define __D3DX9XOF_H__ 14 | 15 | #if defined( __cplusplus ) 16 | extern "C" { 17 | #endif // defined( __cplusplus ) 18 | 19 | //---------------------------------------------------------------------------- 20 | // D3DXF_FILEFORMAT 21 | // This flag is used to specify what file type to use when saving to disk. 22 | // _BINARY, and _TEXT are mutually exclusive, while 23 | // _COMPRESSED is an optional setting that works with all file types. 24 | //---------------------------------------------------------------------------- 25 | typedef DWORD D3DXF_FILEFORMAT; 26 | 27 | #define D3DXF_FILEFORMAT_BINARY 0 28 | #define D3DXF_FILEFORMAT_TEXT 1 29 | #define D3DXF_FILEFORMAT_COMPRESSED 2 30 | 31 | //---------------------------------------------------------------------------- 32 | // D3DXF_FILESAVEOPTIONS 33 | // This flag is used to specify where to save the file to. Each flag is 34 | // mutually exclusive, indicates the data location of the file, and also 35 | // chooses which additional data will specify the location. 36 | // _TOFILE is paired with a filename (LPCSTR) 37 | // _TOWFILE is paired with a filename (LPWSTR) 38 | //---------------------------------------------------------------------------- 39 | typedef DWORD D3DXF_FILESAVEOPTIONS; 40 | 41 | #define D3DXF_FILESAVE_TOFILE 0x00L 42 | #define D3DXF_FILESAVE_TOWFILE 0x01L 43 | 44 | //---------------------------------------------------------------------------- 45 | // D3DXF_FILELOADOPTIONS 46 | // This flag is used to specify where to load the file from. Each flag is 47 | // mutually exclusive, indicates the data location of the file, and also 48 | // chooses which additional data will specify the location. 49 | // _FROMFILE is paired with a filename (LPCSTR) 50 | // _FROMWFILE is paired with a filename (LPWSTR) 51 | // _FROMRESOURCE is paired with a (D3DXF_FILELOADRESOUCE*) description. 52 | // _FROMMEMORY is paired with a (D3DXF_FILELOADMEMORY*) description. 53 | //---------------------------------------------------------------------------- 54 | typedef DWORD D3DXF_FILELOADOPTIONS; 55 | 56 | #define D3DXF_FILELOAD_FROMFILE 0x00L 57 | #define D3DXF_FILELOAD_FROMWFILE 0x01L 58 | #define D3DXF_FILELOAD_FROMRESOURCE 0x02L 59 | #define D3DXF_FILELOAD_FROMMEMORY 0x03L 60 | 61 | //---------------------------------------------------------------------------- 62 | // D3DXF_FILELOADRESOURCE: 63 | //---------------------------------------------------------------------------- 64 | 65 | typedef struct _D3DXF_FILELOADRESOURCE 66 | { 67 | HMODULE hModule; // Desc 68 | LPCSTR lpName; // Desc 69 | LPCSTR lpType; // Desc 70 | } D3DXF_FILELOADRESOURCE; 71 | 72 | //---------------------------------------------------------------------------- 73 | // D3DXF_FILELOADMEMORY: 74 | //---------------------------------------------------------------------------- 75 | 76 | typedef struct _D3DXF_FILELOADMEMORY 77 | { 78 | LPCVOID lpMemory; // Desc 79 | SIZE_T dSize; // Desc 80 | } D3DXF_FILELOADMEMORY; 81 | 82 | #if defined( _WIN32 ) && !defined( _NO_COM ) 83 | 84 | // {cef08cf9-7b4f-4429-9624-2a690a933201} 85 | DEFINE_GUID( IID_ID3DXFile, 86 | 0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 87 | 88 | // {cef08cfa-7b4f-4429-9624-2a690a933201} 89 | DEFINE_GUID( IID_ID3DXFileSaveObject, 90 | 0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 91 | 92 | // {cef08cfb-7b4f-4429-9624-2a690a933201} 93 | DEFINE_GUID( IID_ID3DXFileSaveData, 94 | 0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 95 | 96 | // {cef08cfc-7b4f-4429-9624-2a690a933201} 97 | DEFINE_GUID( IID_ID3DXFileEnumObject, 98 | 0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 99 | 100 | // {cef08cfd-7b4f-4429-9624-2a690a933201} 101 | DEFINE_GUID( IID_ID3DXFileData, 102 | 0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); 103 | 104 | #endif // defined( _WIN32 ) && !defined( _NO_COM ) 105 | 106 | #if defined( __cplusplus ) 107 | #if !defined( DECLSPEC_UUID ) 108 | #if _MSC_VER >= 1100 109 | #define DECLSPEC_UUID( x ) __declspec( uuid( x ) ) 110 | #else // !( _MSC_VER >= 1100 ) 111 | #define DECLSPEC_UUID( x ) 112 | #endif // !( _MSC_VER >= 1100 ) 113 | #endif // !defined( DECLSPEC_UUID ) 114 | 115 | interface DECLSPEC_UUID( "cef08cf9-7b4f-4429-9624-2a690a933201" ) 116 | ID3DXFile; 117 | interface DECLSPEC_UUID( "cef08cfa-7b4f-4429-9624-2a690a933201" ) 118 | ID3DXFileSaveObject; 119 | interface DECLSPEC_UUID( "cef08cfb-7b4f-4429-9624-2a690a933201" ) 120 | ID3DXFileSaveData; 121 | interface DECLSPEC_UUID( "cef08cfc-7b4f-4429-9624-2a690a933201" ) 122 | ID3DXFileEnumObject; 123 | interface DECLSPEC_UUID( "cef08cfd-7b4f-4429-9624-2a690a933201" ) 124 | ID3DXFileData; 125 | 126 | #if defined( _COM_SMARTPTR_TYPEDEF ) 127 | _COM_SMARTPTR_TYPEDEF( ID3DXFile, 128 | __uuidof( ID3DXFile ) ); 129 | _COM_SMARTPTR_TYPEDEF( ID3DXFileSaveObject, 130 | __uuidof( ID3DXFileSaveObject ) ); 131 | _COM_SMARTPTR_TYPEDEF( ID3DXFileSaveData, 132 | __uuidof( ID3DXFileSaveData ) ); 133 | _COM_SMARTPTR_TYPEDEF( ID3DXFileEnumObject, 134 | __uuidof( ID3DXFileEnumObject ) ); 135 | _COM_SMARTPTR_TYPEDEF( ID3DXFileData, 136 | __uuidof( ID3DXFileData ) ); 137 | #endif // defined( _COM_SMARTPTR_TYPEDEF ) 138 | #endif // defined( __cplusplus ) 139 | 140 | typedef interface ID3DXFile ID3DXFile; 141 | typedef interface ID3DXFileSaveObject ID3DXFileSaveObject; 142 | typedef interface ID3DXFileSaveData ID3DXFileSaveData; 143 | typedef interface ID3DXFileEnumObject ID3DXFileEnumObject; 144 | typedef interface ID3DXFileData ID3DXFileData; 145 | 146 | ////////////////////////////////////////////////////////////////////////////// 147 | // ID3DXFile ///////////////////////////////////////////////////////////////// 148 | ////////////////////////////////////////////////////////////////////////////// 149 | 150 | #undef INTERFACE 151 | #define INTERFACE ID3DXFile 152 | 153 | DECLARE_INTERFACE_( ID3DXFile, IUnknown ) 154 | { 155 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 156 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 157 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 158 | 159 | STDMETHOD( CreateEnumObject )( THIS_ LPCVOID, D3DXF_FILELOADOPTIONS, 160 | ID3DXFileEnumObject** ) PURE; 161 | STDMETHOD( CreateSaveObject )( THIS_ LPCVOID, D3DXF_FILESAVEOPTIONS, 162 | D3DXF_FILEFORMAT, ID3DXFileSaveObject** ) PURE; 163 | STDMETHOD( RegisterTemplates )( THIS_ LPCVOID, SIZE_T ) PURE; 164 | STDMETHOD( RegisterEnumTemplates )( THIS_ ID3DXFileEnumObject* ) PURE; 165 | }; 166 | 167 | ////////////////////////////////////////////////////////////////////////////// 168 | // ID3DXFileSaveObject /////////////////////////////////////////////////////// 169 | ////////////////////////////////////////////////////////////////////////////// 170 | 171 | #undef INTERFACE 172 | #define INTERFACE ID3DXFileSaveObject 173 | 174 | DECLARE_INTERFACE_( ID3DXFileSaveObject, IUnknown ) 175 | { 176 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 177 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 178 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 179 | 180 | STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE; 181 | STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*, 182 | SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE; 183 | STDMETHOD( Save )( THIS ) PURE; 184 | }; 185 | 186 | ////////////////////////////////////////////////////////////////////////////// 187 | // ID3DXFileSaveData ///////////////////////////////////////////////////////// 188 | ////////////////////////////////////////////////////////////////////////////// 189 | 190 | #undef INTERFACE 191 | #define INTERFACE ID3DXFileSaveData 192 | 193 | DECLARE_INTERFACE_( ID3DXFileSaveData, IUnknown ) 194 | { 195 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 196 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 197 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 198 | 199 | STDMETHOD( GetSave )( THIS_ ID3DXFileSaveObject** ) PURE; 200 | STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE; 201 | STDMETHOD( GetId )( THIS_ LPGUID ) PURE; 202 | STDMETHOD( GetType )( THIS_ GUID* ) PURE; 203 | STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*, 204 | SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE; 205 | STDMETHOD( AddDataReference )( THIS_ LPCSTR, CONST GUID* ) PURE; 206 | }; 207 | 208 | ////////////////////////////////////////////////////////////////////////////// 209 | // ID3DXFileEnumObject /////////////////////////////////////////////////////// 210 | ////////////////////////////////////////////////////////////////////////////// 211 | 212 | #undef INTERFACE 213 | #define INTERFACE ID3DXFileEnumObject 214 | 215 | DECLARE_INTERFACE_( ID3DXFileEnumObject, IUnknown ) 216 | { 217 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 218 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 219 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 220 | 221 | STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE; 222 | STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE; 223 | STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE; 224 | STDMETHOD( GetDataObjectById )( THIS_ REFGUID, ID3DXFileData** ) PURE; 225 | STDMETHOD( GetDataObjectByName )( THIS_ LPCSTR, ID3DXFileData** ) PURE; 226 | }; 227 | 228 | ////////////////////////////////////////////////////////////////////////////// 229 | // ID3DXFileData ///////////////////////////////////////////////////////////// 230 | ////////////////////////////////////////////////////////////////////////////// 231 | 232 | #undef INTERFACE 233 | #define INTERFACE ID3DXFileData 234 | 235 | DECLARE_INTERFACE_( ID3DXFileData, IUnknown ) 236 | { 237 | STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; 238 | STDMETHOD_( ULONG, AddRef )( THIS ) PURE; 239 | STDMETHOD_( ULONG, Release )( THIS ) PURE; 240 | 241 | STDMETHOD( GetEnum )( THIS_ ID3DXFileEnumObject** ) PURE; 242 | STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE; 243 | STDMETHOD( GetId )( THIS_ LPGUID ) PURE; 244 | STDMETHOD( Lock )( THIS_ SIZE_T*, LPCVOID* ) PURE; 245 | STDMETHOD( Unlock )( THIS ) PURE; 246 | STDMETHOD( GetType )( THIS_ GUID* ) PURE; 247 | STDMETHOD_( BOOL, IsReference )( THIS ) PURE; 248 | STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE; 249 | STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE; 250 | }; 251 | 252 | STDAPI D3DXFileCreate( ID3DXFile** lplpDirectXFile ); 253 | 254 | /* 255 | * DirectX File errors. 256 | */ 257 | 258 | #define _FACD3DXF 0x876 259 | 260 | #define D3DXFERR_BADOBJECT MAKE_HRESULT( 1, _FACD3DXF, 900 ) 261 | #define D3DXFERR_BADVALUE MAKE_HRESULT( 1, _FACD3DXF, 901 ) 262 | #define D3DXFERR_BADTYPE MAKE_HRESULT( 1, _FACD3DXF, 902 ) 263 | #define D3DXFERR_NOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 903 ) 264 | #define D3DXFERR_NOTDONEYET MAKE_HRESULT( 1, _FACD3DXF, 904 ) 265 | #define D3DXFERR_FILENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 905 ) 266 | #define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 906 ) 267 | #define D3DXFERR_BADRESOURCE MAKE_HRESULT( 1, _FACD3DXF, 907 ) 268 | #define D3DXFERR_BADFILETYPE MAKE_HRESULT( 1, _FACD3DXF, 908 ) 269 | #define D3DXFERR_BADFILEVERSION MAKE_HRESULT( 1, _FACD3DXF, 909 ) 270 | #define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT( 1, _FACD3DXF, 910 ) 271 | #define D3DXFERR_BADFILE MAKE_HRESULT( 1, _FACD3DXF, 911 ) 272 | #define D3DXFERR_PARSEERROR MAKE_HRESULT( 1, _FACD3DXF, 912 ) 273 | #define D3DXFERR_BADARRAYSIZE MAKE_HRESULT( 1, _FACD3DXF, 913 ) 274 | #define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT( 1, _FACD3DXF, 914 ) 275 | #define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT( 1, _FACD3DXF, 915 ) 276 | #define D3DXFERR_NOMOREDATA MAKE_HRESULT( 1, _FACD3DXF, 916 ) 277 | #define D3DXFERR_BADCACHEFILE MAKE_HRESULT( 1, _FACD3DXF, 917 ) 278 | 279 | /* 280 | * DirectX File object types. 281 | */ 282 | 283 | #ifndef WIN_TYPES 284 | #define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype 285 | #endif 286 | 287 | WIN_TYPES(ID3DXFile, D3DXFILE); 288 | WIN_TYPES(ID3DXFileEnumObject, D3DXFILEENUMOBJECT); 289 | WIN_TYPES(ID3DXFileSaveObject, D3DXFILESAVEOBJECT); 290 | WIN_TYPES(ID3DXFileData, D3DXFILEDATA); 291 | WIN_TYPES(ID3DXFileSaveData, D3DXFILESAVEDATA); 292 | 293 | #if defined( __cplusplus ) 294 | } // extern "C" 295 | #endif // defined( __cplusplus ) 296 | 297 | #endif // !defined( __D3DX9XOF_H__ ) 298 | 299 | 300 | -------------------------------------------------------------------------------- /Include/D3D10_1shader.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // File: D3D10_1Shader.h 6 | // Content: D3D10.1 Shader Types and APIs 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef __D3D10_1SHADER_H__ 11 | #define __D3D10_1SHADER_H__ 12 | 13 | #include "d3d10shader.h" 14 | 15 | //---------------------------------------------------------------------------- 16 | // Shader debugging structures 17 | //---------------------------------------------------------------------------- 18 | 19 | typedef enum _D3D10_SHADER_DEBUG_REGTYPE 20 | { 21 | D3D10_SHADER_DEBUG_REG_INPUT, 22 | D3D10_SHADER_DEBUG_REG_OUTPUT, 23 | D3D10_SHADER_DEBUG_REG_CBUFFER, 24 | D3D10_SHADER_DEBUG_REG_TBUFFER, 25 | D3D10_SHADER_DEBUG_REG_TEMP, 26 | D3D10_SHADER_DEBUG_REG_TEMPARRAY, 27 | D3D10_SHADER_DEBUG_REG_TEXTURE, 28 | D3D10_SHADER_DEBUG_REG_SAMPLER, 29 | D3D10_SHADER_DEBUG_REG_IMMEDIATECBUFFER, 30 | D3D10_SHADER_DEBUG_REG_LITERAL, 31 | D3D10_SHADER_DEBUG_REG_UNUSED, 32 | D3D11_SHADER_DEBUG_REG_INTERFACE_POINTERS, 33 | D3D11_SHADER_DEBUG_REG_UAV, 34 | D3D10_SHADER_DEBUG_REG_FORCE_DWORD = 0x7fffffff, 35 | } D3D10_SHADER_DEBUG_REGTYPE; 36 | 37 | typedef enum _D3D10_SHADER_DEBUG_SCOPETYPE 38 | { 39 | D3D10_SHADER_DEBUG_SCOPE_GLOBAL, 40 | D3D10_SHADER_DEBUG_SCOPE_BLOCK, 41 | D3D10_SHADER_DEBUG_SCOPE_FORLOOP, 42 | D3D10_SHADER_DEBUG_SCOPE_STRUCT, 43 | D3D10_SHADER_DEBUG_SCOPE_FUNC_PARAMS, 44 | D3D10_SHADER_DEBUG_SCOPE_STATEBLOCK, 45 | D3D10_SHADER_DEBUG_SCOPE_NAMESPACE, 46 | D3D10_SHADER_DEBUG_SCOPE_ANNOTATION, 47 | D3D10_SHADER_DEBUG_SCOPE_FORCE_DWORD = 0x7fffffff, 48 | } D3D10_SHADER_DEBUG_SCOPETYPE; 49 | 50 | typedef enum _D3D10_SHADER_DEBUG_VARTYPE 51 | { 52 | D3D10_SHADER_DEBUG_VAR_VARIABLE, 53 | D3D10_SHADER_DEBUG_VAR_FUNCTION, 54 | D3D10_SHADER_DEBUG_VAR_FORCE_DWORD = 0x7fffffff, 55 | } D3D10_SHADER_DEBUG_VARTYPE; 56 | 57 | ///////////////////////////////////////////////////////////////////// 58 | // These are the serialized structures that get written to the file 59 | ///////////////////////////////////////////////////////////////////// 60 | 61 | typedef struct _D3D10_SHADER_DEBUG_TOKEN_INFO 62 | { 63 | UINT File; // offset into file list 64 | UINT Line; // line # 65 | UINT Column; // column # 66 | 67 | UINT TokenLength; 68 | UINT TokenId; // offset to LPCSTR of length TokenLength in string datastore 69 | } D3D10_SHADER_DEBUG_TOKEN_INFO; 70 | 71 | // Variable list 72 | typedef struct _D3D10_SHADER_DEBUG_VAR_INFO 73 | { 74 | // Index into token list for declaring identifier 75 | UINT TokenId; 76 | D3D10_SHADER_VARIABLE_TYPE Type; 77 | // register and component for this variable, only valid/necessary for arrays 78 | UINT Register; 79 | UINT Component; 80 | // gives the original variable that declared this variable 81 | UINT ScopeVar; 82 | // this variable's offset in its ScopeVar 83 | UINT ScopeVarOffset; 84 | } D3D10_SHADER_DEBUG_VAR_INFO; 85 | 86 | typedef struct _D3D10_SHADER_DEBUG_INPUT_INFO 87 | { 88 | // index into array of variables of variable to initialize 89 | UINT Var; 90 | // input, cbuffer, tbuffer 91 | D3D10_SHADER_DEBUG_REGTYPE InitialRegisterSet; 92 | // set to cbuffer or tbuffer slot, geometry shader input primitive #, 93 | // identifying register for indexable temp, or -1 94 | UINT InitialBank; 95 | // -1 if temp, otherwise gives register in register set 96 | UINT InitialRegister; 97 | // -1 if temp, otherwise gives component 98 | UINT InitialComponent; 99 | // initial value if literal 100 | UINT InitialValue; 101 | } D3D10_SHADER_DEBUG_INPUT_INFO; 102 | 103 | typedef struct _D3D10_SHADER_DEBUG_SCOPEVAR_INFO 104 | { 105 | // Index into variable token 106 | UINT TokenId; 107 | 108 | D3D10_SHADER_DEBUG_VARTYPE VarType; // variable or function (different namespaces) 109 | D3D10_SHADER_VARIABLE_CLASS Class; 110 | UINT Rows; // number of rows (matrices) 111 | UINT Columns; // number of columns (vectors and matrices) 112 | 113 | // In an array of structures, one struct member scope is provided, and 114 | // you'll have to add the array stride times the index to the variable 115 | // index you find, then find that variable in this structure's list of 116 | // variables. 117 | 118 | // gives a scope to look up struct members. -1 if not a struct 119 | UINT StructMemberScope; 120 | 121 | // number of array indices 122 | UINT uArrayIndices; // a[3][2][1] has 3 indices 123 | // maximum array index for each index 124 | // offset to UINT[uArrayIndices] in UINT datastore 125 | UINT ArrayElements; // a[3][2][1] has {3, 2, 1} 126 | // how many variables each array index moves 127 | // offset to UINT[uArrayIndices] in UINT datastore 128 | UINT ArrayStrides; // a[3][2][1] has {2, 1, 1} 129 | 130 | UINT uVariables; 131 | // index of the first variable, later variables are offsets from this one 132 | UINT uFirstVariable; 133 | } D3D10_SHADER_DEBUG_SCOPEVAR_INFO; 134 | 135 | // scope data, this maps variable names to debug variables (useful for the watch window) 136 | typedef struct _D3D10_SHADER_DEBUG_SCOPE_INFO 137 | { 138 | D3D10_SHADER_DEBUG_SCOPETYPE ScopeType; 139 | UINT Name; // offset to name of scope in strings list 140 | UINT uNameLen; // length of name string 141 | UINT uVariables; 142 | UINT VariableData; // Offset to UINT[uVariables] indexing the Scope Variable list 143 | } D3D10_SHADER_DEBUG_SCOPE_INFO; 144 | 145 | // instruction outputs 146 | typedef struct _D3D10_SHADER_DEBUG_OUTPUTVAR 147 | { 148 | // index variable being written to, if -1 it's not going to a variable 149 | UINT Var; 150 | // range data that the compiler expects to be true 151 | UINT uValueMin, uValueMax; 152 | INT iValueMin, iValueMax; 153 | FLOAT fValueMin, fValueMax; 154 | 155 | BOOL bNaNPossible, bInfPossible; 156 | } D3D10_SHADER_DEBUG_OUTPUTVAR; 157 | 158 | typedef struct _D3D10_SHADER_DEBUG_OUTPUTREG_INFO 159 | { 160 | // Only temp, indexable temp, and output are valid here 161 | D3D10_SHADER_DEBUG_REGTYPE OutputRegisterSet; 162 | // -1 means no output 163 | UINT OutputReg; 164 | // if a temp array, identifier for which one 165 | UINT TempArrayReg; 166 | // -1 means masked out 167 | UINT OutputComponents[4]; 168 | D3D10_SHADER_DEBUG_OUTPUTVAR OutputVars[4]; 169 | // when indexing the output, get the value of this register, then add 170 | // that to uOutputReg. If uIndexReg is -1, then there is no index. 171 | // find the variable whose register is the sum (by looking in the ScopeVar) 172 | // and component matches, then set it. This should only happen for indexable 173 | // temps and outputs. 174 | UINT IndexReg; 175 | UINT IndexComp; 176 | } D3D10_SHADER_DEBUG_OUTPUTREG_INFO; 177 | 178 | // per instruction data 179 | typedef struct _D3D10_SHADER_DEBUG_INST_INFO 180 | { 181 | UINT Id; // Which instruction this is in the bytecode 182 | UINT Opcode; // instruction type 183 | 184 | // 0, 1, or 2 185 | UINT uOutputs; 186 | 187 | // up to two outputs per instruction 188 | D3D10_SHADER_DEBUG_OUTPUTREG_INFO pOutputs[2]; 189 | 190 | // index into the list of tokens for this instruction's token 191 | UINT TokenId; 192 | 193 | // how many function calls deep this instruction is 194 | UINT NestingLevel; 195 | 196 | // list of scopes from outer-most to inner-most 197 | // Number of scopes 198 | UINT Scopes; 199 | UINT ScopeInfo; // Offset to UINT[uScopes] specifying indices of the ScopeInfo Array 200 | 201 | // list of variables accessed by this instruction 202 | // Number of variables 203 | UINT AccessedVars; 204 | UINT AccessedVarsInfo; // Offset to UINT[AccessedVars] specifying indices of the ScopeVariableInfo Array 205 | } D3D10_SHADER_DEBUG_INST_INFO; 206 | 207 | typedef struct _D3D10_SHADER_DEBUG_FILE_INFO 208 | { 209 | UINT FileName; // Offset to LPCSTR for file name 210 | UINT FileNameLen; // Length of file name 211 | UINT FileData; // Offset to LPCSTR of length FileLen 212 | UINT FileLen; // Length of file 213 | } D3D10_SHADER_DEBUG_FILE_INFO; 214 | 215 | typedef struct _D3D10_SHADER_DEBUG_INFO 216 | { 217 | UINT Size; // sizeof(D3D10_SHADER_DEBUG_INFO) 218 | UINT Creator; // Offset to LPCSTR for compiler version 219 | UINT EntrypointName; // Offset to LPCSTR for Entry point name 220 | UINT ShaderTarget; // Offset to LPCSTR for shader target 221 | UINT CompileFlags; // flags used to compile 222 | UINT Files; // number of included files 223 | UINT FileInfo; // Offset to D3D10_SHADER_DEBUG_FILE_INFO[Files] 224 | UINT Instructions; // number of instructions 225 | UINT InstructionInfo; // Offset to D3D10_SHADER_DEBUG_INST_INFO[Instructions] 226 | UINT Variables; // number of variables 227 | UINT VariableInfo; // Offset to D3D10_SHADER_DEBUG_VAR_INFO[Variables] 228 | UINT InputVariables; // number of variables to initialize before running 229 | UINT InputVariableInfo; // Offset to D3D10_SHADER_DEBUG_INPUT_INFO[InputVariables] 230 | UINT Tokens; // number of tokens to initialize 231 | UINT TokenInfo; // Offset to D3D10_SHADER_DEBUG_TOKEN_INFO[Tokens] 232 | UINT Scopes; // number of scopes 233 | UINT ScopeInfo; // Offset to D3D10_SHADER_DEBUG_SCOPE_INFO[Scopes] 234 | UINT ScopeVariables; // number of variables declared 235 | UINT ScopeVariableInfo; // Offset to D3D10_SHADER_DEBUG_SCOPEVAR_INFO[Scopes] 236 | UINT UintOffset; // Offset to the UINT datastore, all UINT offsets are from this offset 237 | UINT StringOffset; // Offset to the string datastore, all string offsets are from this offset 238 | } D3D10_SHADER_DEBUG_INFO; 239 | 240 | //---------------------------------------------------------------------------- 241 | // ID3D10ShaderReflection1: 242 | //---------------------------------------------------------------------------- 243 | 244 | // 245 | // Interface definitions 246 | // 247 | 248 | typedef interface ID3D10ShaderReflection1 ID3D10ShaderReflection1; 249 | typedef interface ID3D10ShaderReflection1 *LPD3D10SHADERREFLECTION1; 250 | 251 | // {C3457783-A846-47CE-9520-CEA6F66E7447} 252 | DEFINE_GUID(IID_ID3D10ShaderReflection1, 253 | 0xc3457783, 0xa846, 0x47ce, 0x95, 0x20, 0xce, 0xa6, 0xf6, 0x6e, 0x74, 0x47); 254 | 255 | #undef INTERFACE 256 | #define INTERFACE ID3D10ShaderReflection1 257 | 258 | DECLARE_INTERFACE_(ID3D10ShaderReflection1, IUnknown) 259 | { 260 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; 261 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 262 | STDMETHOD_(ULONG, Release)(THIS) PURE; 263 | 264 | STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_DESC *pDesc) PURE; 265 | 266 | STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE; 267 | STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE; 268 | 269 | STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE; 270 | 271 | STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; 272 | STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE; 273 | 274 | STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE; 275 | 276 | STDMETHOD(GetResourceBindingDescByName)(THIS_ LPCSTR Name, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE; 277 | 278 | STDMETHOD(GetMovInstructionCount)(THIS_ UINT* pCount) PURE; 279 | STDMETHOD(GetMovcInstructionCount)(THIS_ UINT* pCount) PURE; 280 | STDMETHOD(GetConversionInstructionCount)(THIS_ UINT* pCount) PURE; 281 | STDMETHOD(GetBitwiseInstructionCount)(THIS_ UINT* pCount) PURE; 282 | 283 | STDMETHOD(GetGSInputPrimitive)(THIS_ D3D10_PRIMITIVE* pPrim) PURE; 284 | STDMETHOD(IsLevel9Shader)(THIS_ BOOL* pbLevel9Shader) PURE; 285 | STDMETHOD(IsSampleFrequencyShader)(THIS_ BOOL* pbSampleFrequency) PURE; 286 | }; 287 | 288 | ////////////////////////////////////////////////////////////////////////////// 289 | // APIs ////////////////////////////////////////////////////////////////////// 290 | ////////////////////////////////////////////////////////////////////////////// 291 | 292 | #ifdef __cplusplus 293 | extern "C" { 294 | #endif //__cplusplus 295 | 296 | #ifdef __cplusplus 297 | } 298 | #endif //__cplusplus 299 | 300 | #endif //__D3D10_1SHADER_H__ 301 | 302 | --------------------------------------------------------------------------------