d3d10misc.h 4.4 KB

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