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

1688 lines
84 KiB

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