d3d10misc.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // File: D3D10Misc.h
  6. // Content: D3D10 Device Creation APIs
  7. //
  8. //////////////////////////////////////////////////////////////////////////////
  9. #ifndef __D3D10MISC_H__
  10. #define __D3D10MISC_H__
  11. #include "d3d10.h"
  12. // ID3D10Blob has been made version-neutral and moved to d3dcommon.h.
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif //__cplusplus
  16. #include <winapifamily.h>
  17. #pragma region Desktop Family
  18. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  19. ///////////////////////////////////////////////////////////////////////////
  20. // D3D10_DRIVER_TYPE
  21. // ----------------
  22. //
  23. // This identifier is used to determine the implementation of Direct3D10
  24. // to be used.
  25. //
  26. // Pass one of these values to D3D10CreateDevice
  27. //
  28. ///////////////////////////////////////////////////////////////////////////
  29. typedef enum D3D10_DRIVER_TYPE
  30. {
  31. D3D10_DRIVER_TYPE_HARDWARE = 0,
  32. D3D10_DRIVER_TYPE_REFERENCE = 1,
  33. D3D10_DRIVER_TYPE_NULL = 2,
  34. D3D10_DRIVER_TYPE_SOFTWARE = 3,
  35. D3D10_DRIVER_TYPE_WARP = 5,
  36. } D3D10_DRIVER_TYPE;
  37. DEFINE_GUID(GUID_DeviceType,
  38. 0xd722fb4d, 0x7a68, 0x437a, 0xb2, 0x0c, 0x58, 0x04, 0xee, 0x24, 0x94, 0xa6);
  39. ///////////////////////////////////////////////////////////////////////////
  40. // D3D10CreateDevice
  41. // ------------------
  42. //
  43. // pAdapter
  44. // If NULL, D3D10CreateDevice will choose the primary adapter and
  45. // create a new instance from a temporarily created IDXGIFactory.
  46. // If non-NULL, D3D10CreateDevice will register the appropriate
  47. // device, if necessary (via IDXGIAdapter::RegisterDrver), before
  48. // creating the device.
  49. // DriverType
  50. // Specifies the driver type to be created: hardware, reference or
  51. // null.
  52. // Software
  53. // HMODULE of a DLL implementing a software rasterizer. Must be NULL for
  54. // non-Software driver types.
  55. // Flags
  56. // Any of those documented for D3D10CreateDevice.
  57. // SDKVersion
  58. // SDK version. Use the D3D10_SDK_VERSION macro.
  59. // ppDevice
  60. // Pointer to returned interface.
  61. //
  62. // Return Values
  63. // Any of those documented for
  64. // CreateDXGIFactory
  65. // IDXGIFactory::EnumAdapters
  66. // IDXGIAdapter::RegisterDriver
  67. // D3D10CreateDevice
  68. //
  69. ///////////////////////////////////////////////////////////////////////////
  70. HRESULT WINAPI D3D10CreateDevice(
  71. _In_opt_ IDXGIAdapter *pAdapter,
  72. D3D10_DRIVER_TYPE DriverType,
  73. HMODULE Software,
  74. UINT Flags,
  75. UINT SDKVersion,
  76. _Out_opt_ ID3D10Device **ppDevice);
  77. ///////////////////////////////////////////////////////////////////////////
  78. // D3D10CreateDeviceAndSwapChain
  79. // ------------------------------
  80. //
  81. // ppAdapter
  82. // If NULL, D3D10CreateDevice will choose the primary adapter and
  83. // create a new instance from a temporarily created IDXGIFactory.
  84. // If non-NULL, D3D10CreateDevice will register the appropriate
  85. // device, if necessary (via IDXGIAdapter::RegisterDrver), before
  86. // creating the device.
  87. // DriverType
  88. // Specifies the driver type to be created: hardware, reference or
  89. // null.
  90. // Software
  91. // HMODULE of a DLL implementing a software rasterizer. Must be NULL for
  92. // non-Software driver types.
  93. // Flags
  94. // Any of those documented for D3D10CreateDevice.
  95. // SDKVersion
  96. // SDK version. Use the D3D10_SDK_VERSION macro.
  97. // pSwapChainDesc
  98. // Swap chain description, may be NULL.
  99. // ppSwapChain
  100. // Pointer to returned interface. May be NULL.
  101. // ppDevice
  102. // Pointer to returned interface.
  103. //
  104. // Return Values
  105. // Any of those documented for
  106. // CreateDXGIFactory
  107. // IDXGIFactory::EnumAdapters
  108. // IDXGIAdapter::RegisterDriver
  109. // D3D10CreateDevice
  110. // IDXGIFactory::CreateSwapChain
  111. //
  112. ///////////////////////////////////////////////////////////////////////////
  113. HRESULT WINAPI D3D10CreateDeviceAndSwapChain(
  114. _In_opt_ IDXGIAdapter *pAdapter,
  115. D3D10_DRIVER_TYPE DriverType,
  116. HMODULE Software,
  117. UINT Flags,
  118. UINT SDKVersion,
  119. _In_opt_ DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
  120. _Out_opt_ IDXGISwapChain **ppSwapChain,
  121. _Out_opt_ ID3D10Device **ppDevice);
  122. ///////////////////////////////////////////////////////////////////////////
  123. // D3D10CreateBlob:
  124. // -----------------
  125. // Creates a Buffer of n Bytes
  126. //////////////////////////////////////////////////////////////////////////
  127. HRESULT WINAPI D3D10CreateBlob(SIZE_T NumBytes, _Out_ LPD3D10BLOB *ppBuffer);
  128. #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
  129. #pragma endregion
  130. #ifdef __cplusplus
  131. }
  132. #endif //__cplusplus
  133. #endif //__D3D10EFFECT_H__