home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / d3d.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  85.9 KB  |  1,686 lines

  1. /*==========================================================================;
  2.  *
  3.  *
  4.  *  File:   d3d.h
  5.  *  Content:    Direct3D include file
  6.  *
  7.  ****************************************************************************/
  8.  
  9. #ifndef _D3D_H_
  10. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  11. #define _D3D_H_
  12.  
  13.  
  14. #include <stdlib.h>
  15.  
  16. #define COM_NO_WINDOWS_H
  17. #include <objbase.h>
  18.  
  19. #define D3DAPI WINAPI
  20.  
  21. #ifndef DIRECT3D_VERSION
  22. #define DIRECT3D_VERSION         0x0700
  23. #endif
  24.  
  25. /*
  26.  * Interface IID's
  27.  */
  28. #if defined( _WIN32 ) && !defined( _NO_COM)
  29. DEFINE_GUID( IID_IDirect3D,             0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  30. #if(DIRECT3D_VERSION >= 0x0500)
  31. DEFINE_GUID( IID_IDirect3D2,            0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
  32. #endif /* DIRECT3D_VERSION >= 0x0500 */
  33. #if(DIRECT3D_VERSION >= 0x0600)
  34. DEFINE_GUID( IID_IDirect3D3,            0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
  35. #endif /* DIRECT3D_VERSION >= 0x0600 */
  36. #if(DIRECT3D_VERSION >= 0x0700)
  37. DEFINE_GUID( IID_IDirect3D7,            0xf5049e77,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
  38. #endif /* DIRECT3D_VERSION >= 0x0700 */
  39.  
  40. #if(DIRECT3D_VERSION >= 0x0500)
  41. DEFINE_GUID( IID_IDirect3DRampDevice,   0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  42. DEFINE_GUID( IID_IDirect3DRGBDevice,    0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  43. DEFINE_GUID( IID_IDirect3DHALDevice,    0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  44. DEFINE_GUID( IID_IDirect3DMMXDevice,    0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  45. #endif /* DIRECT3D_VERSION >= 0x0500 */
  46.  
  47. #if(DIRECT3D_VERSION >= 0x0600)
  48. DEFINE_GUID( IID_IDirect3DRefDevice,    0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  49. DEFINE_GUID( IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  50. #endif /* DIRECT3D_VERSION >= 0x0600 */
  51. #if(DIRECT3D_VERSION >= 0x0700)
  52. DEFINE_GUID( IID_IDirect3DTnLHalDevice, 0xf5049e78, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  53. #endif /* DIRECT3D_VERSION >= 0x0700 */
  54.  
  55. /*
  56.  * Internal Guid to distinguish requested MMX from MMX being used as an RGB rasterizer
  57.  */
  58.  
  59. DEFINE_GUID( IID_IDirect3DDevice,       0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  60. #if(DIRECT3D_VERSION >= 0x0500)
  61. DEFINE_GUID( IID_IDirect3DDevice2,  0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  62. #endif /* DIRECT3D_VERSION >= 0x0500 */
  63. #if(DIRECT3D_VERSION >= 0x0600)
  64. DEFINE_GUID( IID_IDirect3DDevice3,  0xb0ab3b60, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
  65. #endif /* DIRECT3D_VERSION >= 0x0600 */
  66. #if(DIRECT3D_VERSION >= 0x0700)
  67. DEFINE_GUID( IID_IDirect3DDevice7,  0xf5049e79, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  68. #endif /* DIRECT3D_VERSION >= 0x0700 */
  69.  
  70. DEFINE_GUID( IID_IDirect3DTexture,      0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  71. #if(DIRECT3D_VERSION >= 0x0500)
  72. DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  73. #endif /* DIRECT3D_VERSION >= 0x0500 */
  74.  
  75. DEFINE_GUID( IID_IDirect3DLight,        0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  76.  
  77. DEFINE_GUID( IID_IDirect3DMaterial,     0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  78. #if(DIRECT3D_VERSION >= 0x0500)
  79. DEFINE_GUID( IID_IDirect3DMaterial2,    0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  80. #endif /* DIRECT3D_VERSION >= 0x0500 */
  81. #if(DIRECT3D_VERSION >= 0x0600)
  82. DEFINE_GUID( IID_IDirect3DMaterial3,    0xca9c46f4, 0xd3c5, 0x11d1, 0xb7, 0x5a, 0x0, 0x60, 0x8, 0x52, 0xb3, 0x12);
  83. #endif /* DIRECT3D_VERSION >= 0x0600 */
  84.  
  85. DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  86. DEFINE_GUID( IID_IDirect3DViewport,     0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  87. #if(DIRECT3D_VERSION >= 0x0500)
  88. DEFINE_GUID( IID_IDirect3DViewport2,    0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  89. #endif /* DIRECT3D_VERSION >= 0x0500 */
  90. #if(DIRECT3D_VERSION >= 0x0600)
  91. DEFINE_GUID( IID_IDirect3DViewport3,    0xb0ab3b61, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
  92. #endif /* DIRECT3D_VERSION >= 0x0600 */
  93. #if(DIRECT3D_VERSION >= 0x0600)
  94. DEFINE_GUID( IID_IDirect3DVertexBuffer, 0x7a503555, 0x4a83, 0x11d1, 0xa5, 0xdb, 0x0, 0xa0, 0xc9, 0x3, 0x67, 0xf8);
  95. #endif /* DIRECT3D_VERSION >= 0x0600 */
  96. #if(DIRECT3D_VERSION >= 0x0700)
  97. DEFINE_GUID( IID_IDirect3DVertexBuffer7, 0xf5049e7d, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  98. #endif /* DIRECT3D_VERSION >= 0x0700 */
  99. #endif
  100.  
  101. #ifdef __cplusplus
  102. struct IDirect3D;
  103. struct IDirect3DDevice;
  104. struct IDirect3DLight;
  105. struct IDirect3DMaterial;
  106. struct IDirect3DExecuteBuffer;
  107. struct IDirect3DTexture;
  108. struct IDirect3DViewport;
  109. typedef struct IDirect3D            *LPDIRECT3D;
  110. typedef struct IDirect3DDevice      *LPDIRECT3DDEVICE;
  111. typedef struct IDirect3DExecuteBuffer   *LPDIRECT3DEXECUTEBUFFER;
  112. typedef struct IDirect3DLight       *LPDIRECT3DLIGHT;
  113. typedef struct IDirect3DMaterial    *LPDIRECT3DMATERIAL;
  114. typedef struct IDirect3DTexture     *LPDIRECT3DTEXTURE;
  115. typedef struct IDirect3DViewport    *LPDIRECT3DVIEWPORT;
  116.  
  117. #if(DIRECT3D_VERSION >= 0x0500)
  118. struct IDirect3D2;
  119. struct IDirect3DDevice2;
  120. struct IDirect3DMaterial2;
  121. struct IDirect3DTexture2;
  122. struct IDirect3DViewport2;
  123. typedef struct IDirect3D2           *LPDIRECT3D2;
  124. typedef struct IDirect3DDevice2     *LPDIRECT3DDEVICE2;
  125. typedef struct IDirect3DMaterial2   *LPDIRECT3DMATERIAL2;
  126. typedef struct IDirect3DTexture2    *LPDIRECT3DTEXTURE2;
  127. typedef struct IDirect3DViewport2   *LPDIRECT3DVIEWPORT2;
  128. #endif /* DIRECT3D_VERSION >= 0x0500 */
  129.  
  130. #if(DIRECT3D_VERSION >= 0x0600)
  131. struct IDirect3D3;
  132. struct IDirect3DDevice3;
  133. struct IDirect3DMaterial3;
  134. struct IDirect3DViewport3;
  135. struct IDirect3DVertexBuffer;
  136. typedef struct IDirect3D3            *LPDIRECT3D3;
  137. typedef struct IDirect3DDevice3      *LPDIRECT3DDEVICE3;
  138. typedef struct IDirect3DMaterial3    *LPDIRECT3DMATERIAL3;
  139. typedef struct IDirect3DViewport3    *LPDIRECT3DVIEWPORT3;
  140. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  141. #endif /* DIRECT3D_VERSION >= 0x0600 */
  142.  
  143. #if(DIRECT3D_VERSION >= 0x0700)
  144. struct IDirect3D7;
  145. struct IDirect3DDevice7;
  146. struct IDirect3DVertexBuffer7;
  147. typedef struct IDirect3D7             *LPDIRECT3D7;
  148. typedef struct IDirect3DDevice7       *LPDIRECT3DDEVICE7;
  149. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  150. #endif /* DIRECT3D_VERSION >= 0x0700 */
  151.  
  152. #else
  153.  
  154. typedef struct IDirect3D        *LPDIRECT3D;
  155. typedef struct IDirect3DDevice      *LPDIRECT3DDEVICE;
  156. typedef struct IDirect3DExecuteBuffer   *LPDIRECT3DEXECUTEBUFFER;
  157. typedef struct IDirect3DLight       *LPDIRECT3DLIGHT;
  158. typedef struct IDirect3DMaterial    *LPDIRECT3DMATERIAL;
  159. typedef struct IDirect3DTexture     *LPDIRECT3DTEXTURE;
  160. typedef struct IDirect3DViewport    *LPDIRECT3DVIEWPORT;
  161.  
  162. #if(DIRECT3D_VERSION >= 0x0500)
  163. typedef struct IDirect3D2           *LPDIRECT3D2;
  164. typedef struct IDirect3DDevice2     *LPDIRECT3DDEVICE2;
  165. typedef struct IDirect3DMaterial2   *LPDIRECT3DMATERIAL2;
  166. typedef struct IDirect3DTexture2    *LPDIRECT3DTEXTURE2;
  167. typedef struct IDirect3DViewport2   *LPDIRECT3DVIEWPORT2;
  168. #endif /* DIRECT3D_VERSION >= 0x0500 */
  169.  
  170. #if(DIRECT3D_VERSION >= 0x0600)
  171. typedef struct IDirect3D3            *LPDIRECT3D3;
  172. typedef struct IDirect3DDevice3      *LPDIRECT3DDEVICE3;
  173. typedef struct IDirect3DMaterial3    *LPDIRECT3DMATERIAL3;
  174. typedef struct IDirect3DViewport3    *LPDIRECT3DVIEWPORT3;
  175. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  176. #endif /* DIRECT3D_VERSION >= 0x0600 */
  177.  
  178. #if(DIRECT3D_VERSION >= 0x0700)
  179. typedef struct IDirect3D7             *LPDIRECT3D7;
  180. typedef struct IDirect3DDevice7       *LPDIRECT3DDEVICE7;
  181. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  182. #endif /* DIRECT3D_VERSION >= 0x0700 */
  183.  
  184. #endif
  185.  
  186. #include "d3dtypes.h"
  187. #include "d3dcaps.h"
  188.  
  189.  
  190. #ifdef __cplusplus
  191. extern "C" {
  192. #endif
  193.  
  194. /*
  195.  * Direct3D interfaces
  196.  */
  197. #undef INTERFACE
  198. #define INTERFACE IDirect3D
  199.  
  200. DECLARE_INTERFACE_(IDirect3D, IUnknown)
  201. {
  202.     /*** IUnknown methods ***/
  203.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  204.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  205.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  206.  
  207.     /*** IDirect3D methods ***/
  208.     STDMETHOD(Initialize)(THIS_ REFCLSID) PURE;
  209.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  210.     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
  211.     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL*,IUnknown*) PURE;
  212.     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT*,IUnknown*) PURE;
  213.     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  214. };
  215.  
  216. typedef struct IDirect3D *LPDIRECT3D;
  217.  
  218. #if !defined(__cplusplus) || defined(CINTERFACE)
  219. #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  220. #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
  221. #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
  222. #define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  223. #define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  224. #define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  225. #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  226. #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  227. #define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  228. #else
  229. #define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  230. #define IDirect3D_AddRef(p) (p)->AddRef()
  231. #define IDirect3D_Release(p) (p)->Release()
  232. #define IDirect3D_Initialize(p,a) (p)->Initialize(a)
  233. #define IDirect3D_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  234. #define IDirect3D_CreateLight(p,a,b) (p)->CreateLight(a,b)
  235. #define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  236. #define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  237. #define IDirect3D_FindDevice(p,a,b) (p)->FindDevice(a,b)
  238. #endif
  239.  
  240. #if(DIRECT3D_VERSION >= 0x0500)
  241. #undef INTERFACE
  242. #define INTERFACE IDirect3D2
  243.  
  244. DECLARE_INTERFACE_(IDirect3D2, IUnknown)
  245. {
  246.     /*** IUnknown methods ***/
  247.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  248.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  249.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  250.  
  251.     /*** IDirect3D2 methods ***/
  252.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  253.     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
  254.     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2*,IUnknown*) PURE;
  255.     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2*,IUnknown*) PURE;
  256.     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  257.     STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE,LPDIRECT3DDEVICE2*) PURE;
  258. };
  259.  
  260. typedef struct IDirect3D2 *LPDIRECT3D2;
  261.  
  262. #if !defined(__cplusplus) || defined(CINTERFACE)
  263. #define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  264. #define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
  265. #define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
  266. #define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  267. #define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  268. #define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  269. #define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  270. #define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  271. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  272. #else
  273. #define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  274. #define IDirect3D2_AddRef(p) (p)->AddRef()
  275. #define IDirect3D2_Release(p) (p)->Release()
  276. #define IDirect3D2_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  277. #define IDirect3D2_CreateLight(p,a,b) (p)->CreateLight(a,b)
  278. #define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  279. #define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  280. #define IDirect3D2_FindDevice(p,a,b) (p)->FindDevice(a,b)
  281. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  282. #endif
  283. #endif /* DIRECT3D_VERSION >= 0x0500 */
  284.  
  285. #if(DIRECT3D_VERSION >= 0x0600)
  286. #undef INTERFACE
  287. #define INTERFACE IDirect3D3
  288.  
  289. DECLARE_INTERFACE_(IDirect3D3, IUnknown)
  290. {
  291.     /*** IUnknown methods ***/
  292.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  293.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  294.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  295.  
  296.     /*** IDirect3D3 methods ***/
  297.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  298.     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,LPUNKNOWN) PURE;
  299.     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3*,LPUNKNOWN) PURE;
  300.     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3*,LPUNKNOWN) PURE;
  301.     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  302.     STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE4,LPDIRECT3DDEVICE3*,LPUNKNOWN) PURE;
  303.     STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER*,DWORD,LPUNKNOWN) PURE;
  304.     STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  305.     STDMETHOD(EvictManagedTextures)(THIS) PURE;
  306. };
  307.  
  308. typedef struct IDirect3D3 *LPDIRECT3D3;
  309.  
  310. #if !defined(__cplusplus) || defined(CINTERFACE)
  311. #define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  312. #define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p)
  313. #define IDirect3D3_Release(p) (p)->lpVtbl->Release(p)
  314. #define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  315. #define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  316. #define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  317. #define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  318. #define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  319. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
  320. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d)
  321. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
  322. #define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
  323. #else
  324. #define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  325. #define IDirect3D3_AddRef(p) (p)->AddRef()
  326. #define IDirect3D3_Release(p) (p)->Release()
  327. #define IDirect3D3_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  328. #define IDirect3D3_CreateLight(p,a,b) (p)->CreateLight(a,b)
  329. #define IDirect3D3_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  330. #define IDirect3D3_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  331. #define IDirect3D3_FindDevice(p,a,b) (p)->FindDevice(a,b)
  332. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d)
  333. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d)
  334. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
  335. #define IDirect3D3_EvictManagedTextures(p) (p)->EvictManagedTextures()
  336. #endif
  337. #endif /* DIRECT3D_VERSION >= 0x0600 */
  338.  
  339. #if(DIRECT3D_VERSION >= 0x0700)
  340. #undef INTERFACE
  341. #define INTERFACE IDirect3D7
  342.  
  343. DECLARE_INTERFACE_(IDirect3D7, IUnknown)
  344. {
  345.     /*** IUnknown methods ***/
  346.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  347.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  348.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  349.  
  350.     /*** IDirect3D7 methods ***/
  351.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7,LPVOID) PURE;
  352.     STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE7,LPDIRECT3DDEVICE7*) PURE;
  353.     STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER7*,DWORD) PURE;
  354.     STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  355.     STDMETHOD(EvictManagedTextures)(THIS) PURE;
  356. };
  357.  
  358. typedef struct IDirect3D7 *LPDIRECT3D7;
  359.  
  360. #if !defined(__cplusplus) || defined(CINTERFACE)
  361. #define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  362. #define IDirect3D7_AddRef(p) (p)->lpVtbl->AddRef(p)
  363. #define IDirect3D7_Release(p) (p)->lpVtbl->Release(p)
  364. #define IDirect3D7_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  365. #define IDirect3D7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  366. #define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c)
  367. #define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
  368. #define IDirect3D7_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
  369. #else
  370. #define IDirect3D7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  371. #define IDirect3D7_AddRef(p) (p)->AddRef()
  372. #define IDirect3D7_Release(p) (p)->Release()
  373. #define IDirect3D7_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  374. #define IDirect3D7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  375. #define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->CreateVertexBuffer(a,b,c)
  376. #define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
  377. #define IDirect3D7_EvictManagedTextures(p) (p)->EvictManagedTextures()
  378. #endif
  379. #endif /* DIRECT3D_VERSION >= 0x0700 */
  380. /*
  381.  * Direct3D Device interfaces
  382.  */
  383. #undef INTERFACE
  384. #define INTERFACE IDirect3DDevice
  385.  
  386. DECLARE_INTERFACE_(IDirect3DDevice, IUnknown)
  387. {
  388.     /*** IUnknown methods ***/
  389.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  390.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  391.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  392.  
  393.     /*** IDirect3DDevice methods ***/
  394.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D,LPGUID,LPD3DDEVICEDESC) PURE;
  395.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  396.     STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE,LPDIRECT3DTEXTURE) PURE;
  397.     STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC,LPDIRECT3DEXECUTEBUFFER*,IUnknown*) PURE;
  398.     STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  399.     STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD) PURE;
  400.     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
  401.     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
  402.     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT,LPDIRECT3DVIEWPORT*,DWORD) PURE;
  403.     STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD,LPD3DRECT) PURE;
  404.     STDMETHOD(GetPickRecords)(THIS_ LPDWORD,LPD3DPICKRECORD) PURE;
  405.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
  406.     STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE) PURE;
  407.     STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE,const LPD3DMATRIX) PURE;
  408.     STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE,LPD3DMATRIX) PURE;
  409.     STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE) PURE;
  410.     STDMETHOD(BeginScene)(THIS) PURE;
  411.     STDMETHOD(EndScene)(THIS) PURE;
  412.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D*) PURE;
  413. };
  414.  
  415. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  416.  
  417. #if !defined(__cplusplus) || defined(CINTERFACE)
  418. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  419. #define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  420. #define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
  421. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  422. #define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  423. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  424. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c)
  425. #define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  426. #define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c)
  427. #define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  428. #define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  429. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  430. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d)
  431. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b)
  432. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  433. #define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a)
  434. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b)
  435. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b)
  436. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a)
  437. #define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  438. #define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
  439. #define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  440. #else
  441. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  442. #define IDirect3DDevice_AddRef(p) (p)->AddRef()
  443. #define IDirect3DDevice_Release(p) (p)->Release()
  444. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  445. #define IDirect3DDevice_GetCaps(p,a,b) (p)->GetCaps(a,b)
  446. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  447. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c)
  448. #define IDirect3DDevice_GetStats(p,a) (p)->GetStats(a)
  449. #define IDirect3DDevice_Execute(p,a,b,c) (p)->Execute(a,b,c)
  450. #define IDirect3DDevice_AddViewport(p,a) (p)->AddViewport(a)
  451. #define IDirect3DDevice_DeleteViewport(p,a) (p)->DeleteViewport(a)
  452. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  453. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->Pick(a,b,c,d)
  454. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->GetPickRecords(a,b)
  455. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  456. #define IDirect3DDevice_CreateMatrix(p,a) (p)->CreateMatrix(a)
  457. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->SetMatrix(a,b)
  458. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->GetMatrix(a,b)
  459. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->DeleteMatrix(a)
  460. #define IDirect3DDevice_BeginScene(p) (p)->BeginScene()
  461. #define IDirect3DDevice_EndScene(p) (p)->EndScene()
  462. #define IDirect3DDevice_GetDirect3D(p,a) (p)->GetDirect3D(a)
  463. #endif
  464.  
  465. #if(DIRECT3D_VERSION >= 0x0500)
  466. #undef INTERFACE
  467. #define INTERFACE IDirect3DDevice2
  468.  
  469. DECLARE_INTERFACE_(IDirect3DDevice2, IUnknown)
  470. {
  471.     /*** IUnknown methods ***/
  472.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  473.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  474.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  475.  
  476.     /*** IDirect3DDevice2 methods ***/
  477.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  478.     STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2,LPDIRECT3DTEXTURE2) PURE;
  479.     STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  480.     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  481.     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  482.     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2,LPDIRECT3DVIEWPORT2*,DWORD) PURE;
  483.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
  484.     STDMETHOD(BeginScene)(THIS) PURE;
  485.     STDMETHOD(EndScene)(THIS) PURE;
  486.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2*) PURE;
  487.     STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  488.     STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *) PURE;
  489.     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE,DWORD) PURE;
  490.     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
  491.     STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,DWORD) PURE;
  492.     STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE;
  493.     STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
  494.     STDMETHOD(Index)(THIS_ WORD) PURE;
  495.     STDMETHOD(End)(THIS_ DWORD) PURE;
  496.     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  497.     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  498.     STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
  499.     STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
  500.     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  501.     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  502.     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  503.     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE;
  504.     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  505.     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  506.     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  507. };
  508.  
  509. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  510.  
  511. #if !defined(__cplusplus) || defined(CINTERFACE)
  512. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  513. #define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
  514. #define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
  515. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  516. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  517. #define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  518. #define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  519. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  520. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  521. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  522. #define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  523. #define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
  524. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  525. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  526. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  527. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  528. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  529. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  530. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  531. #define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  532. #define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a)
  533. #define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a)
  534. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  535. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  536. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  537. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  538. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  539. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  540. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  541. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  542. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  543. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  544. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  545. #else
  546. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  547. #define IDirect3DDevice2_AddRef(p) (p)->AddRef()
  548. #define IDirect3DDevice2_Release(p) (p)->Release()
  549. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->GetCaps(a,b)
  550. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  551. #define IDirect3DDevice2_GetStats(p,a) (p)->GetStats(a)
  552. #define IDirect3DDevice2_AddViewport(p,a) (p)->AddViewport(a)
  553. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->DeleteViewport(a)
  554. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  555. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  556. #define IDirect3DDevice2_BeginScene(p) (p)->BeginScene()
  557. #define IDirect3DDevice2_EndScene(p) (p)->EndScene()
  558. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->GetDirect3D(a)
  559. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  560. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  561. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  562. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  563. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->Begin(a,b,c)
  564. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  565. #define IDirect3DDevice2_Vertex(p,a) (p)->Vertex(a)
  566. #define IDirect3DDevice2_Index(p,a) (p)->Index(a)
  567. #define IDirect3DDevice2_End(p,a) (p)->End(a)
  568. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  569. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  570. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->GetLightState(a,b)
  571. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->SetLightState(a,b)
  572. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->SetTransform(a,b)
  573. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->GetTransform(a,b)
  574. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  575. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  576. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  577. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->SetClipStatus(a)
  578. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->GetClipStatus(a)
  579. #endif
  580. #endif /* DIRECT3D_VERSION >= 0x0500 */
  581.  
  582. #if(DIRECT3D_VERSION >= 0x0600)
  583. #undef INTERFACE
  584. #define INTERFACE IDirect3DDevice3
  585.  
  586. DECLARE_INTERFACE_(IDirect3DDevice3, IUnknown)
  587. {
  588.     /*** IUnknown methods ***/
  589.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  590.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  591.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  592.  
  593.     /*** IDirect3DDevice3 methods ***/
  594.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  595.     STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  596.     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  597.     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  598.     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3,LPDIRECT3DVIEWPORT3*,DWORD) PURE;
  599.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  600.     STDMETHOD(BeginScene)(THIS) PURE;
  601.     STDMETHOD(EndScene)(THIS) PURE;
  602.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3*) PURE;
  603.     STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  604.     STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *) PURE;
  605.     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4,DWORD) PURE;
  606.     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *) PURE;
  607.     STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,DWORD,DWORD) PURE;
  608.     STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  609.     STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
  610.     STDMETHOD(Index)(THIS_ WORD) PURE;
  611.     STDMETHOD(End)(THIS_ DWORD) PURE;
  612.     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  613.     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  614.     STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
  615.     STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
  616.     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  617.     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  618.     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  619.     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  620.     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  621.     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  622.     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  623.     STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,DWORD) PURE;
  624.     STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,DWORD) PURE;
  625.     STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,DWORD,DWORD,DWORD) PURE;
  626.     STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,LPWORD,DWORD,DWORD) PURE;
  627.     STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE;
  628.     STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2 *) PURE;
  629.     STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2) PURE;
  630.     STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE;
  631.     STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
  632.     STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE;
  633. };
  634.  
  635. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  636.  
  637. #if !defined(__cplusplus) || defined(CINTERFACE)
  638. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  639. #define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p)
  640. #define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p)
  641. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  642. #define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  643. #define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  644. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  645. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  646. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  647. #define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  648. #define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p)
  649. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  650. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  651. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  652. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  653. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  654. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  655. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  656. #define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  657. #define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a)
  658. #define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a)
  659. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  660. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  661. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  662. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  663. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  664. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  665. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  666. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  667. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  668. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  669. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  670. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
  671. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
  672. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
  673. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e)
  674. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
  675. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
  676. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
  677. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
  678. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
  679. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
  680. #else
  681. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  682. #define IDirect3DDevice3_AddRef(p) (p)->AddRef()
  683. #define IDirect3DDevice3_Release(p) (p)->Release()
  684. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->GetCaps(a,b)
  685. #define IDirect3DDevice3_GetStats(p,a) (p)->GetStats(a)
  686. #define IDirect3DDevice3_AddViewport(p,a) (p)->AddViewport(a)
  687. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->DeleteViewport(a)
  688. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  689. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  690. #define IDirect3DDevice3_BeginScene(p) (p)->BeginScene()
  691. #define IDirect3DDevice3_EndScene(p) (p)->EndScene()
  692. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->GetDirect3D(a)
  693. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  694. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  695. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  696. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  697. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->Begin(a,b,c)
  698. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  699. #define IDirect3DDevice3_Vertex(p,a) (p)->Vertex(a)
  700. #define IDirect3DDevice3_Index(p,a) (p)->Index(a)
  701. #define IDirect3DDevice3_End(p,a) (p)->End(a)
  702. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  703. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  704. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->GetLightState(a,b)
  705. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->SetLightState(a,b)
  706. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->SetTransform(a,b)
  707. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->GetTransform(a,b)
  708. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  709. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  710. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  711. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->SetClipStatus(a)
  712. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->GetClipStatus(a)
  713. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
  714. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
  715. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
  716. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e)
  717. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
  718. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->GetTexture(a,b)
  719. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->SetTexture(a,b)
  720. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
  721. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
  722. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->ValidateDevice(a)
  723. #endif
  724. #endif /* DIRECT3D_VERSION >= 0x0600 */
  725.  
  726. #if(DIRECT3D_VERSION >= 0x0700)
  727. #undef INTERFACE
  728. #define INTERFACE IDirect3DDevice7
  729.  
  730. DECLARE_INTERFACE_(IDirect3DDevice7, IUnknown)
  731. {
  732.     /*** IUnknown methods ***/
  733.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  734.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  735.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  736.  
  737.     /*** IDirect3DDevice7 methods ***/
  738.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC7) PURE;
  739.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  740.     STDMETHOD(BeginScene)(THIS) PURE;
  741.     STDMETHOD(EndScene)(THIS) PURE;
  742.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D7*) PURE;
  743.     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7,DWORD) PURE;
  744.     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 *) PURE;
  745.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE;
  746.     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  747.     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  748.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT7) PURE;
  749.     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  750.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT7) PURE;
  751.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL7) PURE;
  752.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL7) PURE;
  753.     STDMETHOD(SetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE;
  754.     STDMETHOD(GetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE;
  755.     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  756.     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  757.     STDMETHOD(BeginStateBlock)(THIS) PURE;
  758.     STDMETHOD(EndStateBlock)(THIS_ LPDWORD) PURE;
  759.     STDMETHOD(PreLoad)(THIS_ LPDIRECTDRAWSURFACE7) PURE;
  760.     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  761.     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  762.     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  763.     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  764.     STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,DWORD) PURE;
  765.     STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,DWORD) PURE;
  766.     STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,DWORD) PURE;
  767.     STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,LPWORD,DWORD,DWORD) PURE;
  768.     STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE;
  769.     STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7 *) PURE;
  770.     STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE;
  771.     STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE;
  772.     STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
  773.     STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE;
  774.     STDMETHOD(ApplyStateBlock)(THIS_ DWORD) PURE;
  775.     STDMETHOD(CaptureStateBlock)(THIS_ DWORD) PURE;
  776.     STDMETHOD(DeleteStateBlock)(THIS_ DWORD) PURE;
  777.     STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE,LPDWORD) PURE;
  778.     STDMETHOD(Load)(THIS_ LPDIRECTDRAWSURFACE7,LPPOINT,LPDIRECTDRAWSURFACE7,LPRECT,DWORD) PURE;
  779.     STDMETHOD(LightEnable)(THIS_ DWORD,BOOL) PURE;
  780.     STDMETHOD(GetLightEnable)(THIS_ DWORD,BOOL*) PURE;
  781.     STDMETHOD(SetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE;
  782.     STDMETHOD(GetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE;
  783.     STDMETHOD(GetInfo)(THIS_ DWORD,LPVOID,DWORD) PURE;
  784. };
  785.  
  786. typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
  787.  
  788. #if !defined(__cplusplus) || defined(CINTERFACE)
  789. #define IDirect3DDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  790. #define IDirect3DDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
  791. #define IDirect3DDevice7_Release(p) (p)->lpVtbl->Release(p)
  792. #define IDirect3DDevice7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  793. #define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  794. #define IDirect3DDevice7_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  795. #define IDirect3DDevice7_EndScene(p) (p)->lpVtbl->EndScene(p)
  796. #define IDirect3DDevice7_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  797. #define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  798. #define IDirect3DDevice7_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  799. #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
  800. #define IDirect3DDevice7_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  801. #define IDirect3DDevice7_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  802. #define IDirect3DDevice7_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  803. #define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  804. #define IDirect3DDevice7_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  805. #define IDirect3DDevice7_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  806. #define IDirect3DDevice7_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  807. #define IDirect3DDevice7_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
  808. #define IDirect3DDevice7_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b)
  809. #define IDirect3DDevice7_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  810. #define IDirect3DDevice7_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  811. #define IDirect3DDevice7_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p)
  812. #define IDirect3DDevice7_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a)
  813. #define IDirect3DDevice7_PreLoad(p,a) (p)->lpVtbl->PreLoad(p,a)
  814. #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  815. #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  816. #define IDirect3DDevice7_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  817. #define IDirect3DDevice7_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  818. #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
  819. #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
  820. #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
  821. #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)
  822. #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
  823. #define IDirect3DDevice7_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
  824. #define IDirect3DDevice7_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
  825. #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
  826. #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
  827. #define IDirect3DDevice7_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
  828. #define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a)
  829. #define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a)
  830. #define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a)
  831. #define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b)
  832. #define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->lpVtbl->Load(p,a,b,c,d,e)
  833. #define IDirect3DDevice7_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b)
  834. #define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b)
  835. #define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b)
  836. #define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b)
  837. #define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c)
  838. #else
  839. #define IDirect3DDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  840. #define IDirect3DDevice7_AddRef(p) (p)->AddRef()
  841. #define IDirect3DDevice7_Release(p) (p)->Release()
  842. #define IDirect3DDevice7_GetCaps(p,a) (p)->GetCaps(a)
  843. #define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  844. #define IDirect3DDevice7_BeginScene(p) (p)->BeginScene()
  845. #define IDirect3DDevice7_EndScene(p) (p)->EndScene()
  846. #define IDirect3DDevice7_GetDirect3D(p,a) (p)->GetDirect3D(a)
  847. #define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  848. #define IDirect3DDevice7_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  849. #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f)
  850. #define IDirect3DDevice7_SetTransform(p,a,b) (p)->SetTransform(a,b)
  851. #define IDirect3DDevice7_GetTransform(p,a,b) (p)->GetTransform(a,b)
  852. #define IDirect3DDevice7_SetViewport(p,a) (p)->SetViewport(a)
  853. #define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  854. #define IDirect3DDevice7_GetViewport(p,a) (p)->GetViewport(a)
  855. #define IDirect3DDevice7_SetMaterial(p,a) (p)->SetMaterial(a)
  856. #define IDirect3DDevice7_GetMaterial(p,a) (p)->GetMaterial(a)
  857. #define IDirect3DDevice7_SetLight(p,a,b) (p)->SetLight(a,b)
  858. #define IDirect3DDevice7_GetLight(p,a,b) (p)->GetLight(a,b)
  859. #define IDirect3DDevice7_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  860. #define IDirect3DDevice7_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  861. #define IDirect3DDevice7_BeginStateBlock(p) (p)->BeginStateBlock()
  862. #define IDirect3DDevice7_EndStateBlock(p,a) (p)->EndStateBlock(a)
  863. #define IDirect3DDevice7_PreLoad(p,a) (p)->PreLoad(a)
  864. #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  865. #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  866. #define IDirect3DDevice7_SetClipStatus(p,a) (p)->SetClipStatus(a)
  867. #define IDirect3DDevice7_GetClipStatus(p,a) (p)->GetClipStatus(a)
  868. #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
  869. #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
  870. #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
  871. #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e,f,g)
  872. #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
  873. #define IDirect3DDevice7_GetTexture(p,a,b) (p)->GetTexture(a,b)
  874. #define IDirect3DDevice7_SetTexture(p,a,b) (p)->SetTexture(a,b)
  875. #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
  876. #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
  877. #define IDirect3DDevice7_ValidateDevice(p,a) (p)->ValidateDevice(a)
  878. #define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a)
  879. #define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a)
  880. #define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a)
  881. #define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b)
  882. #define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->Load(a,b,c,d,e)
  883. #define IDirect3DDevice7_LightEnable(p,a,b) (p)->LightEnable(a,b)
  884. #define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b)
  885. #define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b)
  886. #define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b)
  887. #define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c)
  888. #endif
  889. #endif /* DIRECT3D_VERSION >= 0x0700 */
  890.  
  891. /*
  892.  * Execute Buffer interface
  893.  */
  894. #undef INTERFACE
  895. #define INTERFACE IDirect3DExecuteBuffer
  896.  
  897. DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown)
  898. {
  899.     /*** IUnknown methods ***/
  900.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  901.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  902.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  903.  
  904.     /*** IDirect3DExecuteBuffer methods ***/
  905.     STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPD3DEXECUTEBUFFERDESC) PURE;
  906.     STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC) PURE;
  907.     STDMETHOD(Unlock)(THIS) PURE;
  908.     STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
  909.     STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
  910.     STDMETHOD(Validate)(THIS_ LPDWORD,LPD3DVALIDATECALLBACK,LPVOID,DWORD) PURE;
  911.     STDMETHOD(Optimize)(THIS_ DWORD) PURE;
  912. };
  913.  
  914. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  915.  
  916. #if !defined(__cplusplus) || defined(CINTERFACE)
  917. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  918. #define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  919. #define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
  920. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  921. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a)
  922. #define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  923. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a)
  924. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a)
  925. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d)
  926. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a)
  927. #else
  928. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  929. #define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef()
  930. #define IDirect3DExecuteBuffer_Release(p) (p)->Release()
  931. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  932. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->Lock(a)
  933. #define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock()
  934. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a)
  935. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a)
  936. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d)
  937. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->Optimize(a)
  938. #endif
  939.  
  940. /*
  941.  * Light interfaces
  942.  */
  943. #undef INTERFACE
  944. #define INTERFACE IDirect3DLight
  945.  
  946. DECLARE_INTERFACE_(IDirect3DLight, IUnknown)
  947. {
  948.     /*** IUnknown methods ***/
  949.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  950.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  951.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  952.  
  953.     /*** IDirect3DLight methods ***/
  954.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  955.     STDMETHOD(SetLight)(THIS_ LPD3DLIGHT) PURE;
  956.     STDMETHOD(GetLight)(THIS_ LPD3DLIGHT) PURE;
  957. };
  958.  
  959. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  960.  
  961. #if !defined(__cplusplus) || defined(CINTERFACE)
  962. #define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  963. #define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
  964. #define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
  965. #define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  966. #define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a)
  967. #define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a)
  968. #else
  969. #define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  970. #define IDirect3DLight_AddRef(p) (p)->AddRef()
  971. #define IDirect3DLight_Release(p) (p)->Release()
  972. #define IDirect3DLight_Initialize(p,a) (p)->Initialize(a)
  973. #define IDirect3DLight_SetLight(p,a) (p)->SetLight(a)
  974. #define IDirect3DLight_GetLight(p,a) (p)->GetLight(a)
  975. #endif
  976.  
  977. /*
  978.  * Material interfaces
  979.  */
  980. #undef INTERFACE
  981. #define INTERFACE IDirect3DMaterial
  982.  
  983. DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown)
  984. {
  985.     /*** IUnknown methods ***/
  986.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  987.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  988.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  989.  
  990.     /*** IDirect3DMaterial methods ***/
  991.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  992.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  993.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  994.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DMATERIALHANDLE) PURE;
  995.     STDMETHOD(Reserve)(THIS) PURE;
  996.     STDMETHOD(Unreserve)(THIS) PURE;
  997. };
  998.  
  999. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  1000.  
  1001. #if !defined(__cplusplus) || defined(CINTERFACE)
  1002. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1003. #define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
  1004. #define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
  1005. #define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1006. #define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  1007. #define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  1008. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1009. #define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
  1010. #define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
  1011. #else
  1012. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1013. #define IDirect3DMaterial_AddRef(p) (p)->AddRef()
  1014. #define IDirect3DMaterial_Release(p) (p)->Release()
  1015. #define IDirect3DMaterial_Initialize(p,a) (p)->Initialize(a)
  1016. #define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a)
  1017. #define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a)
  1018. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1019. #define IDirect3DMaterial_Reserve(p) (p)->Reserve()
  1020. #define IDirect3DMaterial_Unreserve(p) (p)->Unreserve()
  1021. #endif
  1022.  
  1023. #if(DIRECT3D_VERSION >= 0x0500)
  1024. #undef INTERFACE
  1025. #define INTERFACE IDirect3DMaterial2
  1026.  
  1027. DECLARE_INTERFACE_(IDirect3DMaterial2, IUnknown)
  1028. {
  1029.     /*** IUnknown methods ***/
  1030.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1031.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1032.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1033.  
  1034.     /*** IDirect3DMaterial2 methods ***/
  1035.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1036.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1037.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DMATERIALHANDLE) PURE;
  1038. };
  1039.  
  1040. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  1041.  
  1042. #if !defined(__cplusplus) || defined(CINTERFACE)
  1043. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1044. #define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1045. #define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
  1046. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  1047. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  1048. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1049. #else
  1050. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1051. #define IDirect3DMaterial2_AddRef(p) (p)->AddRef()
  1052. #define IDirect3DMaterial2_Release(p) (p)->Release()
  1053. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a)
  1054. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a)
  1055. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1056. #endif
  1057. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1058.  
  1059. #if(DIRECT3D_VERSION >= 0x0600)
  1060. #undef INTERFACE
  1061. #define INTERFACE IDirect3DMaterial3
  1062.  
  1063. DECLARE_INTERFACE_(IDirect3DMaterial3, IUnknown)
  1064. {
  1065.     /*** IUnknown methods ***/
  1066.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1067.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1068.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1069.  
  1070.     /*** IDirect3DMaterial3 methods ***/
  1071.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1072.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1073.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3,LPD3DMATERIALHANDLE) PURE;
  1074. };
  1075.  
  1076. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  1077.  
  1078. #if !defined(__cplusplus) || defined(CINTERFACE)
  1079. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1080. #define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p)
  1081. #define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p)
  1082. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  1083. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  1084. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1085. #else
  1086. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1087. #define IDirect3DMaterial3_AddRef(p) (p)->AddRef()
  1088. #define IDirect3DMaterial3_Release(p) (p)->Release()
  1089. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a)
  1090. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a)
  1091. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1092. #endif
  1093. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1094.  
  1095. /*
  1096.  * Texture interfaces
  1097.  */
  1098. #undef INTERFACE
  1099. #define INTERFACE IDirect3DTexture
  1100.  
  1101. DECLARE_INTERFACE_(IDirect3DTexture, IUnknown)
  1102. {
  1103.     /*** IUnknown methods ***/
  1104.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1105.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1106.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1107.  
  1108.     /*** IDirect3DTexture methods ***/
  1109.     STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPDIRECTDRAWSURFACE) PURE;
  1110.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DTEXTUREHANDLE) PURE;
  1111.     STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
  1112.     STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE) PURE;
  1113.     STDMETHOD(Unload)(THIS) PURE;
  1114. };
  1115.  
  1116. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  1117.  
  1118. #if !defined(__cplusplus) || defined(CINTERFACE)
  1119. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1120. #define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
  1121. #define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
  1122. #define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1123. #define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1124. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  1125. #define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a)
  1126. #define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
  1127. #else
  1128. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1129. #define IDirect3DTexture_AddRef(p) (p)->AddRef()
  1130. #define IDirect3DTexture_Release(p) (p)->Release()
  1131. #define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b)
  1132. #define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1133. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  1134. #define IDirect3DTexture_Load(p,a) (p)->Load(a)
  1135. #define IDirect3DTexture_Unload(p) (p)->Unload()
  1136. #endif
  1137.  
  1138. #if(DIRECT3D_VERSION >= 0x0500)
  1139. #undef INTERFACE
  1140. #define INTERFACE IDirect3DTexture2
  1141.  
  1142. DECLARE_INTERFACE_(IDirect3DTexture2, IUnknown)
  1143. {
  1144.     /*** IUnknown methods ***/
  1145.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1146.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1147.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1148.  
  1149.     /*** IDirect3DTexture2 methods ***/
  1150.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DTEXTUREHANDLE) PURE;
  1151.     STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
  1152.     STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2) PURE;
  1153. };
  1154.  
  1155. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  1156.  
  1157. #if !defined(__cplusplus) || defined(CINTERFACE)
  1158. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1159. #define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1160. #define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
  1161. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1162. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  1163. #define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a)
  1164. #else
  1165. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1166. #define IDirect3DTexture2_AddRef(p) (p)->AddRef()
  1167. #define IDirect3DTexture2_Release(p) (p)->Release()
  1168. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1169. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  1170. #define IDirect3DTexture2_Load(p,a) (p)->Load(a)
  1171. #endif
  1172. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1173.  
  1174. /*
  1175.  * Viewport interfaces
  1176.  */
  1177. #undef INTERFACE
  1178. #define INTERFACE IDirect3DViewport
  1179.  
  1180. DECLARE_INTERFACE_(IDirect3DViewport, IUnknown)
  1181. {
  1182.     /*** IUnknown methods ***/
  1183.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1184.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1185.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1186.  
  1187.     /*** IDirect3DViewport methods ***/
  1188.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  1189.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1190.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1191.     STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  1192.     STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  1193.     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  1194.     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  1195.     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1196.     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  1197.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  1198.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1199.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1200.     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  1201. };
  1202.  
  1203. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  1204.  
  1205. #if !defined(__cplusplus) || defined(CINTERFACE)
  1206. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1207. #define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
  1208. #define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
  1209. #define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1210. #define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  1211. #define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  1212. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  1213. #define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  1214. #define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  1215. #define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  1216. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  1217. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  1218. #define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  1219. #define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  1220. #define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  1221. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  1222. #else
  1223. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1224. #define IDirect3DViewport_AddRef(p) (p)->AddRef()
  1225. #define IDirect3DViewport_Release(p) (p)->Release()
  1226. #define IDirect3DViewport_Initialize(p,a) (p)->Initialize(a)
  1227. #define IDirect3DViewport_GetViewport(p,a) (p)->GetViewport(a)
  1228. #define IDirect3DViewport_SetViewport(p,a) (p)->SetViewport(a)
  1229. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  1230. #define IDirect3DViewport_LightElements(p,a,b) (p)->LightElements(a,b)
  1231. #define IDirect3DViewport_SetBackground(p,a) (p)->SetBackground(a)
  1232. #define IDirect3DViewport_GetBackground(p,a,b) (p)->GetBackground(a,b)
  1233. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  1234. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  1235. #define IDirect3DViewport_Clear(p,a,b,c) (p)->Clear(a,b,c)
  1236. #define IDirect3DViewport_AddLight(p,a) (p)->AddLight(a)
  1237. #define IDirect3DViewport_DeleteLight(p,a) (p)->DeleteLight(a)
  1238. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  1239. #endif
  1240.  
  1241. #if(DIRECT3D_VERSION >= 0x0500)
  1242. #undef INTERFACE
  1243. #define INTERFACE IDirect3DViewport2
  1244.  
  1245. DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport)
  1246. {
  1247.     /*** IUnknown methods ***/
  1248.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1249.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1250.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1251.  
  1252.     /*** IDirect3DViewport methods ***/
  1253.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  1254.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1255.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1256.     STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  1257.     STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  1258.     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  1259.     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  1260.     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1261.     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  1262.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  1263.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1264.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1265.     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  1266.     STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1267.     STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1268. };
  1269.  
  1270. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  1271.  
  1272. #if !defined(__cplusplus) || defined(CINTERFACE)
  1273. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1274. #define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1275. #define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
  1276. #define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1277. #define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  1278. #define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  1279. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  1280. #define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  1281. #define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  1282. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  1283. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  1284. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  1285. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  1286. #define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  1287. #define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  1288. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  1289. #define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  1290. #define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  1291. #else
  1292. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1293. #define IDirect3DViewport2_AddRef(p) (p)->AddRef()
  1294. #define IDirect3DViewport2_Release(p) (p)->Release()
  1295. #define IDirect3DViewport2_Initialize(p,a) (p)->Initialize(a)
  1296. #define IDirect3DViewport2_GetViewport(p,a) (p)->GetViewport(a)
  1297. #define IDirect3DViewport2_SetViewport(p,a) (p)->SetViewport(a)
  1298. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  1299. #define IDirect3DViewport2_LightElements(p,a,b) (p)->LightElements(a,b)
  1300. #define IDirect3DViewport2_SetBackground(p,a) (p)->SetBackground(a)
  1301. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->GetBackground(a,b)
  1302. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  1303. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  1304. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->Clear(a,b,c)
  1305. #define IDirect3DViewport2_AddLight(p,a) (p)->AddLight(a)
  1306. #define IDirect3DViewport2_DeleteLight(p,a) (p)->DeleteLight(a)
  1307. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  1308. #define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a)
  1309. #define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a)
  1310. #endif
  1311. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1312.  
  1313. #if(DIRECT3D_VERSION >= 0x0600)
  1314.  
  1315. #undef INTERFACE
  1316. #define INTERFACE IDirect3DViewport3
  1317.  
  1318. DECLARE_INTERFACE_(IDirect3DViewport3, IDirect3DViewport2)
  1319. {
  1320.     /*** IUnknown methods ***/
  1321.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1322.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1323.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1324.  
  1325.     /*** IDirect3DViewport2 methods ***/
  1326.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  1327.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1328.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1329.     STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  1330.     STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  1331.     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  1332.     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  1333.     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1334.     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  1335.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  1336.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1337.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1338.     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  1339.     STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1340.     STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1341.     STDMETHOD(SetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  1342.     STDMETHOD(GetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4*,LPBOOL) PURE;
  1343.     STDMETHOD(Clear2)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE;
  1344. };
  1345.  
  1346. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  1347.  
  1348. #if !defined(__cplusplus) || defined(CINTERFACE)
  1349. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1350. #define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p)
  1351. #define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p)
  1352. #define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1353. #define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  1354. #define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  1355. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  1356. #define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  1357. #define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  1358. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  1359. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  1360. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  1361. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  1362. #define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  1363. #define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  1364. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  1365. #define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  1366. #define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  1367. #define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->lpVtbl->SetBackgroundDepth2(p,a)
  1368. #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b)
  1369. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f)
  1370. #else
  1371. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1372. #define IDirect3DViewport3_AddRef(p) (p)->AddRef()
  1373. #define IDirect3DViewport3_Release(p) (p)->Release()
  1374. #define IDirect3DViewport3_Initialize(p,a) (p)->Initialize(a)
  1375. #define IDirect3DViewport3_GetViewport(p,a) (p)->GetViewport(a)
  1376. #define IDirect3DViewport3_SetViewport(p,a) (p)->SetViewport(a)
  1377. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  1378. #define IDirect3DViewport3_LightElements(p,a,b) (p)->LightElements(a,b)
  1379. #define IDirect3DViewport3_SetBackground(p,a) (p)->SetBackground(a)
  1380. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->GetBackground(a,b)
  1381. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  1382. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  1383. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->Clear(a,b,c)
  1384. #define IDirect3DViewport3_AddLight(p,a) (p)->AddLight(a)
  1385. #define IDirect3DViewport3_DeleteLight(p,a) (p)->DeleteLight(a)
  1386. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  1387. #define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a)
  1388. #define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a)
  1389. #define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->SetBackgroundDepth2(a)
  1390. #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->GetBackgroundDepth2(a,b)
  1391. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->Clear2(a,b,c,d,e,f)
  1392. #endif
  1393. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1394.  
  1395. #if(DIRECT3D_VERSION >= 0x0600)
  1396. #undef INTERFACE
  1397. #define INTERFACE IDirect3DVertexBuffer
  1398.  
  1399. DECLARE_INTERFACE_(IDirect3DVertexBuffer, IUnknown)
  1400. {
  1401.     /*** IUnknown methods ***/
  1402.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1403.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1404.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1405.  
  1406.     /*** IDirect3DVertexBuffer methods ***/
  1407.     STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE;
  1408.     STDMETHOD(Unlock)(THIS) PURE;
  1409.     STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER,DWORD,LPDIRECT3DDEVICE3,DWORD) PURE;
  1410.     STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE;
  1411.     STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3,DWORD) PURE;
  1412. };
  1413.  
  1414. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  1415.  
  1416. #if !defined(__cplusplus) || defined(CINTERFACE)
  1417. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1418. #define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  1419. #define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p)
  1420. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
  1421. #define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  1422. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
  1423. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
  1424. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
  1425. #else
  1426. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1427. #define IDirect3DVertexBuffer_AddRef(p) (p)->AddRef()
  1428. #define IDirect3DVertexBuffer_Release(p) (p)->Release()
  1429. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->Lock(a,b,c)
  1430. #define IDirect3DVertexBuffer_Unlock(p) (p)->Unlock()
  1431. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
  1432. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
  1433. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->Optimize(a,b)
  1434. #endif
  1435. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1436.  
  1437. #if(DIRECT3D_VERSION >= 0x0700)
  1438. #undef INTERFACE
  1439. #define INTERFACE IDirect3DVertexBuffer7
  1440.  
  1441. DECLARE_INTERFACE_(IDirect3DVertexBuffer7, IUnknown)
  1442. {
  1443.     /*** IUnknown methods ***/
  1444.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1445.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1446.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1447.  
  1448.     /*** IDirect3DVertexBuffer7 methods ***/
  1449.     STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE;
  1450.     STDMETHOD(Unlock)(THIS) PURE;
  1451.     STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER7,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE;
  1452.     STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE;
  1453.     STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE7,DWORD) PURE;
  1454.     STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD,DWORD,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE;
  1455. };
  1456.  
  1457. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  1458.  
  1459. #if !defined(__cplusplus) || defined(CINTERFACE)
  1460. #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1461. #define IDirect3DVertexBuffer7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1462. #define IDirect3DVertexBuffer7_Release(p) (p)->lpVtbl->Release(p)
  1463. #define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
  1464. #define IDirect3DVertexBuffer7_Unlock(p) (p)->lpVtbl->Unlock(p)
  1465. #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
  1466. #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
  1467. #define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
  1468. #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g)
  1469. #else
  1470. #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1471. #define IDirect3DVertexBuffer7_AddRef(p) (p)->AddRef()
  1472. #define IDirect3DVertexBuffer7_Release(p) (p)->Release()
  1473. #define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->Lock(a,b,c)
  1474. #define IDirect3DVertexBuffer7_Unlock(p) (p)->Unlock()
  1475. #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
  1476. #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
  1477. #define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->Optimize(a,b)
  1478. #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->ProcessVerticesStrided(a,b,c,d,e,f,g)
  1479. #endif
  1480. #endif /* DIRECT3D_VERSION >= 0x0700 */
  1481.  
  1482. #if(DIRECT3D_VERSION >= 0x0500)
  1483. /****************************************************************************
  1484.  *
  1485.  * Flags for IDirect3DDevice::NextViewport
  1486.  *
  1487.  ****************************************************************************/
  1488.  
  1489. /*
  1490.  * Return the next viewport
  1491.  */
  1492. #define D3DNEXT_NEXT    0x00000001l
  1493.  
  1494. /*
  1495.  * Return the first viewport
  1496.  */
  1497. #define D3DNEXT_HEAD    0x00000002l
  1498.  
  1499. /*
  1500.  * Return the last viewport
  1501.  */
  1502. #define D3DNEXT_TAIL    0x00000004l
  1503.  
  1504.  
  1505. /****************************************************************************
  1506.  *
  1507.  * Flags for DrawPrimitive/DrawIndexedPrimitive
  1508.  *   Also valid for Begin/BeginIndexed
  1509.  *   Also valid for VertexBuffer::CreateVertexBuffer
  1510.  ****************************************************************************/
  1511.  
  1512. /*
  1513.  * Wait until the device is ready to draw the primitive
  1514.  * This will cause DP to not return DDERR_WASSTILLDRAWING
  1515.  */
  1516. #define D3DDP_WAIT                  0x00000001l
  1517. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1518.  
  1519. #if (DIRECT3D_VERSION == 0x0500)
  1520. /*
  1521.  * Hint that it is acceptable to render the primitive out of order.
  1522.  */
  1523. #define D3DDP_OUTOFORDER            0x00000002l
  1524. #endif
  1525.  
  1526.  
  1527. #if(DIRECT3D_VERSION >= 0x0500)
  1528. /*
  1529.  * Hint that the primitives have been clipped by the application.
  1530.  */
  1531. #define D3DDP_DONOTCLIP             0x00000004l
  1532.  
  1533. /*
  1534.  * Hint that the extents need not be updated.
  1535.  */
  1536. #define D3DDP_DONOTUPDATEEXTENTS    0x00000008l
  1537. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1538.  
  1539. #if(DIRECT3D_VERSION >= 0x0600)
  1540.  
  1541. /*
  1542.  * Hint that the lighting should not be applied on vertices.
  1543.  */
  1544.  
  1545. #define D3DDP_DONOTLIGHT            0x00000010l
  1546.  
  1547. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1548.  
  1549. /*
  1550.  * Direct3D Errors
  1551.  * DirectDraw error codes are used when errors not specified here.
  1552.  */
  1553. #define D3D_OK              DD_OK
  1554. #define D3DERR_BADMAJORVERSION      MAKE_DDHRESULT(700)
  1555. #define D3DERR_BADMINORVERSION      MAKE_DDHRESULT(701)
  1556.  
  1557. #if(DIRECT3D_VERSION >= 0x0500)
  1558. /*
  1559.  * An invalid device was requested by the application.
  1560.  */
  1561. #define D3DERR_INVALID_DEVICE   MAKE_DDHRESULT(705)
  1562. #define D3DERR_INITFAILED       MAKE_DDHRESULT(706)
  1563.  
  1564. /*
  1565.  * SetRenderTarget attempted on a device that was
  1566.  * QI'd off the render target.
  1567.  */
  1568. #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
  1569. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1570.  
  1571. #define D3DERR_EXECUTE_CREATE_FAILED    MAKE_DDHRESULT(710)
  1572. #define D3DERR_EXECUTE_DESTROY_FAILED   MAKE_DDHRESULT(711)
  1573. #define D3DERR_EXECUTE_LOCK_FAILED  MAKE_DDHRESULT(712)
  1574. #define D3DERR_EXECUTE_UNLOCK_FAILED    MAKE_DDHRESULT(713)
  1575. #define D3DERR_EXECUTE_LOCKED       MAKE_DDHRESULT(714)
  1576. #define D3DERR_EXECUTE_NOT_LOCKED   MAKE_DDHRESULT(715)
  1577.  
  1578. #define D3DERR_EXECUTE_FAILED       MAKE_DDHRESULT(716)
  1579. #define D3DERR_EXECUTE_CLIPPED_FAILED   MAKE_DDHRESULT(717)
  1580.  
  1581. #define D3DERR_TEXTURE_NO_SUPPORT   MAKE_DDHRESULT(720)
  1582. #define D3DERR_TEXTURE_CREATE_FAILED    MAKE_DDHRESULT(721)
  1583. #define D3DERR_TEXTURE_DESTROY_FAILED   MAKE_DDHRESULT(722)
  1584. #define D3DERR_TEXTURE_LOCK_FAILED  MAKE_DDHRESULT(723)
  1585. #define D3DERR_TEXTURE_UNLOCK_FAILED    MAKE_DDHRESULT(724)
  1586. #define D3DERR_TEXTURE_LOAD_FAILED  MAKE_DDHRESULT(725)
  1587. #define D3DERR_TEXTURE_SWAP_FAILED  MAKE_DDHRESULT(726)
  1588. #define D3DERR_TEXTURE_LOCKED       MAKE_DDHRESULT(727)
  1589. #define D3DERR_TEXTURE_NOT_LOCKED   MAKE_DDHRESULT(728)
  1590. #define D3DERR_TEXTURE_GETSURF_FAILED   MAKE_DDHRESULT(729)
  1591.  
  1592. #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
  1593. #define D3DERR_MATRIX_DESTROY_FAILED    MAKE_DDHRESULT(731)
  1594. #define D3DERR_MATRIX_SETDATA_FAILED    MAKE_DDHRESULT(732)
  1595. #define D3DERR_MATRIX_GETDATA_FAILED    MAKE_DDHRESULT(733)
  1596. #define D3DERR_SETVIEWPORTDATA_FAILED   MAKE_DDHRESULT(734)
  1597.  
  1598. #if(DIRECT3D_VERSION >= 0x0500)
  1599. #define D3DERR_INVALIDCURRENTVIEWPORT   MAKE_DDHRESULT(735)
  1600. #define D3DERR_INVALIDPRIMITIVETYPE     MAKE_DDHRESULT(736)
  1601. #define D3DERR_INVALIDVERTEXTYPE        MAKE_DDHRESULT(737)
  1602. #define D3DERR_TEXTURE_BADSIZE          MAKE_DDHRESULT(738)
  1603. #define D3DERR_INVALIDRAMPTEXTURE       MAKE_DDHRESULT(739)
  1604. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1605.  
  1606. #define D3DERR_MATERIAL_CREATE_FAILED   MAKE_DDHRESULT(740)
  1607. #define D3DERR_MATERIAL_DESTROY_FAILED  MAKE_DDHRESULT(741)
  1608. #define D3DERR_MATERIAL_SETDATA_FAILED  MAKE_DDHRESULT(742)
  1609. #define D3DERR_MATERIAL_GETDATA_FAILED  MAKE_DDHRESULT(743)
  1610.  
  1611. #if(DIRECT3D_VERSION >= 0x0500)
  1612. #define D3DERR_INVALIDPALETTE           MAKE_DDHRESULT(744)
  1613.  
  1614. #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
  1615. #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY  MAKE_DDHRESULT(746)
  1616. #define D3DERR_SURFACENOTINVIDMEM       MAKE_DDHRESULT(747)
  1617. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1618.  
  1619. #define D3DERR_LIGHT_SET_FAILED     MAKE_DDHRESULT(750)
  1620. #if(DIRECT3D_VERSION >= 0x0500)
  1621. #define D3DERR_LIGHTHASVIEWPORT     MAKE_DDHRESULT(751)
  1622. #define D3DERR_LIGHTNOTINTHISVIEWPORT           MAKE_DDHRESULT(752)
  1623. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1624.  
  1625. #define D3DERR_SCENE_IN_SCENE       MAKE_DDHRESULT(760)
  1626. #define D3DERR_SCENE_NOT_IN_SCENE   MAKE_DDHRESULT(761)
  1627. #define D3DERR_SCENE_BEGIN_FAILED   MAKE_DDHRESULT(762)
  1628. #define D3DERR_SCENE_END_FAILED     MAKE_DDHRESULT(763)
  1629.  
  1630. #if(DIRECT3D_VERSION >= 0x0500)
  1631. #define D3DERR_INBEGIN                  MAKE_DDHRESULT(770)
  1632. #define D3DERR_NOTINBEGIN               MAKE_DDHRESULT(771)
  1633. #define D3DERR_NOVIEWPORTS              MAKE_DDHRESULT(772)
  1634. #define D3DERR_VIEWPORTDATANOTSET       MAKE_DDHRESULT(773)
  1635. #define D3DERR_VIEWPORTHASNODEVICE      MAKE_DDHRESULT(774)
  1636. #define D3DERR_NOCURRENTVIEWPORT        MAKE_DDHRESULT(775)
  1637. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1638.  
  1639. #if(DIRECT3D_VERSION >= 0x0600)
  1640. #define D3DERR_INVALIDVERTEXFORMAT              MAKE_DDHRESULT(2048)
  1641.  
  1642. /*
  1643.  * Attempted to CreateTexture on a surface that had a color key
  1644.  */
  1645. #define D3DERR_COLORKEYATTACHED                 MAKE_DDHRESULT(2050)
  1646.  
  1647. #define D3DERR_VERTEXBUFFEROPTIMIZED            MAKE_DDHRESULT(2060)
  1648. #define D3DERR_VBUF_CREATE_FAILED               MAKE_DDHRESULT(2061)
  1649. #define D3DERR_VERTEXBUFFERLOCKED               MAKE_DDHRESULT(2062)
  1650. #define D3DERR_VERTEXBUFFERUNLOCKFAILED         MAKE_DDHRESULT(2063)
  1651.  
  1652. #define D3DERR_ZBUFFER_NOTPRESENT               MAKE_DDHRESULT(2070)
  1653. #define D3DERR_STENCILBUFFER_NOTPRESENT         MAKE_DDHRESULT(2071)
  1654.  
  1655. #define D3DERR_WRONGTEXTUREFORMAT               MAKE_DDHRESULT(2072)
  1656. #define D3DERR_UNSUPPORTEDCOLOROPERATION        MAKE_DDHRESULT(2073)
  1657. #define D3DERR_UNSUPPORTEDCOLORARG              MAKE_DDHRESULT(2074)
  1658. #define D3DERR_UNSUPPORTEDALPHAOPERATION        MAKE_DDHRESULT(2075)
  1659. #define D3DERR_UNSUPPORTEDALPHAARG              MAKE_DDHRESULT(2076)
  1660. #define D3DERR_TOOMANYOPERATIONS                MAKE_DDHRESULT(2077)
  1661. #define D3DERR_CONFLICTINGTEXTUREFILTER         MAKE_DDHRESULT(2078)
  1662. #define D3DERR_UNSUPPORTEDFACTORVALUE           MAKE_DDHRESULT(2079)
  1663. #define D3DERR_CONFLICTINGRENDERSTATE           MAKE_DDHRESULT(2081)
  1664. #define D3DERR_UNSUPPORTEDTEXTUREFILTER         MAKE_DDHRESULT(2082)
  1665. #define D3DERR_TOOMANYPRIMITIVES                MAKE_DDHRESULT(2083)
  1666. #define D3DERR_INVALIDMATRIX                    MAKE_DDHRESULT(2084)
  1667. #define D3DERR_TOOMANYVERTICES                  MAKE_DDHRESULT(2085)
  1668. #define D3DERR_CONFLICTINGTEXTUREPALETTE        MAKE_DDHRESULT(2086)
  1669.  
  1670. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1671.  
  1672. #if(DIRECT3D_VERSION >= 0x0700)
  1673. #define D3DERR_INVALIDSTATEBLOCK        MAKE_DDHRESULT(2100)
  1674. #define D3DERR_INBEGINSTATEBLOCK        MAKE_DDHRESULT(2101)
  1675. #define D3DERR_NOTINBEGINSTATEBLOCK     MAKE_DDHRESULT(2102)
  1676. #endif /* DIRECT3D_VERSION >= 0x0700 */
  1677.  
  1678.  
  1679. #ifdef __cplusplus
  1680. };
  1681. #endif
  1682.  
  1683. #pragma option pop /*P_O_Pop*/
  1684. #endif /* _D3D_H_ */
  1685.  
  1686.