Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
3.7 KiB

  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. #include "d3dx11.h"
  10. #ifndef __D3DX11CORE_H__
  11. #define __D3DX11CORE_H__
  12. // Current name of the DLL shipped in the same SDK as this header.
  13. #define D3DX11_DLL_W L"d3dx11_41.dll"
  14. #define D3DX11_DLL_A "d3dx11_41.dll"
  15. #ifdef UNICODE
  16. #define D3DX11_DLL D3DX11_DLL_W
  17. #else
  18. #define D3DX11_DLL D3DX11_DLL_A
  19. #endif
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif //__cplusplus
  23. ///////////////////////////////////////////////////////////////////////////
  24. // D3DX11_SDK_VERSION:
  25. // -----------------
  26. // This identifier is passed to D3DX11CheckVersion in order to ensure that an
  27. // application was built against the correct header files and lib files.
  28. // This number is incremented whenever a header (or other) change would
  29. // require applications to be rebuilt. If the version doesn't match,
  30. // D3DX11CreateVersion will return FALSE. (The number itself has no meaning.)
  31. ///////////////////////////////////////////////////////////////////////////
  32. #define D3DX11_SDK_VERSION 41
  33. #ifdef D3D_DIAG_DLL
  34. BOOL WINAPI D3DX11DebugMute(BOOL Mute);
  35. #endif
  36. HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion);
  37. #ifdef __cplusplus
  38. }
  39. #endif //__cplusplus
  40. //////////////////////////////////////////////////////////////////////////////
  41. // ID3DX11ThreadPump:
  42. //////////////////////////////////////////////////////////////////////////////
  43. #undef INTERFACE
  44. #define INTERFACE ID3DX11DataLoader
  45. DECLARE_INTERFACE(ID3DX11DataLoader)
  46. {
  47. STDMETHOD(Load)(THIS) PURE;
  48. STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE;
  49. STDMETHOD(Destroy)(THIS) PURE;
  50. };
  51. #undef INTERFACE
  52. #define INTERFACE ID3DX11DataProcessor
  53. DECLARE_INTERFACE(ID3DX11DataProcessor)
  54. {
  55. STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE;
  56. STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE;
  57. STDMETHOD(Destroy)(THIS) PURE;
  58. };
  59. // {C93FECFA-6967-478a-ABBC-402D90621FCB}
  60. DEFINE_GUID(IID_ID3DX11ThreadPump,
  61. 0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb);
  62. #undef INTERFACE
  63. #define INTERFACE ID3DX11ThreadPump
  64. DECLARE_INTERFACE_(ID3DX11ThreadPump, IUnknown)
  65. {
  66. // IUnknown
  67. STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
  68. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  69. STDMETHOD_(ULONG, Release)(THIS) PURE;
  70. // ID3DX11ThreadPump
  71. STDMETHOD(AddWorkItem)(THIS_ ID3DX11DataLoader *pDataLoader, ID3DX11DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE;
  72. STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE;
  73. STDMETHOD(WaitForAllItems)(THIS) PURE;
  74. STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount);
  75. STDMETHOD(PurgeAllItems)(THIS) PURE;
  76. STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE;
  77. };
  78. #ifdef __cplusplus
  79. extern "C" {
  80. #endif //__cplusplus
  81. HRESULT WINAPI D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump **ppThreadPump);
  82. HRESULT WINAPI D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext *pContext);
  83. #ifdef __cplusplus
  84. }
  85. #endif //__cplusplus
  86. ///////////////////////////////////////////////////////////////////////////
  87. #define _FACD3D 0x876
  88. #define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code )
  89. #define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code )
  90. #define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156)
  91. #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540)
  92. #endif //__D3DX11CORE_H__