1 module directx.d3dx11core; 2 /////////////////////////////////////////////////////////////////////////// 3 // 4 // Copyright (C) Microsoft Corporation. All Rights Reserved. 5 // 6 // File: d3dx11core.h 7 // Content: D3DX11 core types and functions 8 // 9 /////////////////////////////////////////////////////////////////////////// 10 11 version(Windows): 12 13 import directx.win32; 14 import directx.com; 15 import directx.d3d11; 16 17 // TODO: better handling to dll version name 18 19 // Current name of the DLL shipped in the same SDK as this header. 20 21 enum D3DX11_DLL_W = "d3dx11_43.dll"w; 22 enum D3DX11_DLL_A = "d3dx11_43.dll"; 23 24 alias D3DX11_DLL_W D3DX11_DLL; 25 26 /////////////////////////////////////////////////////////////////////////// 27 // D3DX11_SDK_VERSION: 28 // ----------------- 29 // This identifier is passed to D3DX11CheckVersion in order to ensure that an 30 // application was built against the correct header files and lib files. 31 // This number is incremented whenever a header (or other) change would 32 // require applications to be rebuilt. If the version doesn't match, 33 // D3DX11CreateVersion will return FALSE. (The number itself has no meaning.) 34 /////////////////////////////////////////////////////////////////////////// 35 36 37 enum D3DX11_SDK_VERSION = 43; 38 39 40 version(D3D_DIAG_DLL) 41 extern(Windows) BOOL D3DX11DebugMute(BOOL Mute); 42 43 extern(Windows) HRESULT D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion); 44 45 46 ////////////////////////////////////////////////////////////////////////////// 47 // ID3DX11ThreadPump: 48 ////////////////////////////////////////////////////////////////////////////// 49 50 interface ID3DX11DataLoader 51 { 52 extern(Windows): 53 HRESULT Load(); 54 HRESULT Decompress(void** ppData, SIZE_T* pcBytes); 55 HRESULT Destroy(); 56 } 57 58 interface ID3DX11DataProcessor 59 { 60 extern(Windows): 61 HRESULT Process(void* pData, SIZE_T cBytes); 62 HRESULT CreateDeviceObject(void** ppDataObject); 63 HRESULT Destroy(); 64 } 65 66 mixin( uuid!(ID3DX11ThreadPump, "C93FECFA-6967-478a-ABBC-402D90621FCB") ); 67 interface ID3DX11ThreadPump : IUnknown 68 { 69 extern(Windows): 70 HRESULT AddWorkItem(ID3DX11DataLoader pDataLoader, ID3DX11DataProcessor pDataProcessor, HRESULT* pHResult, void** ppDeviceObject); 71 UINT GetWorkItemCount(); 72 73 HRESULT WaitForAllItems(); 74 HRESULT ProcessDeviceWorkItems(UINT iWorkItemCount); 75 76 HRESULT PurgeAllItems(); 77 HRESULT GetQueueStatus(UINT* pIoQueue, UINT* pProcessQueue, UINT* pDeviceQueue); 78 } 79 80 81 extern(Windows) HRESULT D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump* ppThreadPump); 82 83 extern(Windows) HRESULT D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext pContext); 84 85 86 87 /////////////////////////////////////////////////////////////////////////// 88 89 enum _FACD3D = 0x876; 90 91 HRESULT MAKE_D3DHRESULT(T)(T code) { 92 return MAKE_HRESULT(1, _FACD3D, code); 93 } 94 95 HRESULT MAKE_D3DSTATUS(T)(T code) { 96 return MAKE_HRESULT(0, _FACD3D, code); 97 } 98 99 enum D3DERR_INVALIDCALL = MAKE_D3DHRESULT(2156); 100 enum D3DERR_WASSTILLDRAWING = MAKE_D3DHRESULT(540);