Source code of Windows XP (NT5)
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.

1296 lines
64 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995-1998 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. #include <stdlib.h>
  12. #define COM_NO_WINDOWS_H
  13. #include <objbase.h>
  14. #define D3DAPI WINAPI
  15. #ifndef DIRECT3D_VERSION
  16. #define DIRECT3D_VERSION 0x0600
  17. #endif
  18. /*
  19. * Interface IID's
  20. */
  21. #if defined( _WIN32 ) && !defined( _NO_COM)
  22. DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  23. DEFINE_GUID( IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
  24. DEFINE_GUID( IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
  25. DEFINE_GUID( IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  26. DEFINE_GUID( IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  27. DEFINE_GUID( IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  28. DEFINE_GUID( IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  29. DEFINE_GUID( IID_IDirect3DRefDevice, 0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  30. DEFINE_GUID( IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  31. DEFINE_GUID( IID_IDirect3DDevice, 0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  32. DEFINE_GUID( IID_IDirect3DDevice2, 0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  33. DEFINE_GUID( IID_IDirect3DDevice3, 0xb0ab3b60, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
  34. DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  35. DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  36. DEFINE_GUID( IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  37. DEFINE_GUID( IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  38. DEFINE_GUID( IID_IDirect3DMaterial2, 0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  39. DEFINE_GUID( IID_IDirect3DMaterial3, 0xca9c46f4, 0xd3c5, 0x11d1, 0xb7, 0x5a, 0x0, 0x60, 0x8, 0x52, 0xb3, 0x12);
  40. DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  41. DEFINE_GUID( IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  42. DEFINE_GUID( IID_IDirect3DViewport2, 0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  43. DEFINE_GUID( IID_IDirect3DViewport3, 0xb0ab3b61, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
  44. DEFINE_GUID( IID_IDirect3DVertexBuffer, 0x7a503555, 0x4a83, 0x11d1, 0xa5, 0xdb, 0x0, 0xa0, 0xc9, 0x3, 0x67, 0xf8);
  45. #endif
  46. #ifdef __cplusplus
  47. struct IDirect3D;
  48. struct IDirect3D2;
  49. struct IDirect3D3;
  50. struct IDirect3DDevice;
  51. struct IDirect3DDevice2;
  52. struct IDirect3DDevice3;
  53. struct IDirect3DExecuteBuffer;
  54. struct IDirect3DLight;
  55. struct IDirect3DMaterial;
  56. struct IDirect3DMaterial2;
  57. struct IDirect3DTexture;
  58. struct IDirect3DTexture2;
  59. struct IDirect3DViewport;
  60. struct IDirect3DViewport2;
  61. struct IDirect3DViewport3;
  62. struct IDirect3DVertexBuffer;
  63. typedef struct IDirect3D *LPDIRECT3D;
  64. typedef struct IDirect3D2 *LPDIRECT3D2;
  65. typedef struct IDirect3D3 *LPDIRECT3D3;
  66. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  67. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  68. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  69. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  70. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  71. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  72. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  73. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  74. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  75. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  76. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  77. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  78. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  79. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  80. #else
  81. typedef struct IDirect3D *LPDIRECT3D;
  82. typedef struct IDirect3D2 *LPDIRECT3D2;
  83. typedef struct IDirect3D3 *LPDIRECT3D3;
  84. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  85. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  86. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  87. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  88. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  89. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  90. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  91. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  92. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  93. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  94. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  95. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  96. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  97. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  98. #endif
  99. #include "d3dtypes.h"
  100. #include "d3dcaps.h"
  101. #ifdef __cplusplus
  102. extern "C" {
  103. #endif
  104. /*
  105. * Direct3D interfaces
  106. */
  107. #undef INTERFACE
  108. #define INTERFACE IDirect3D
  109. DECLARE_INTERFACE_(IDirect3D, IUnknown)
  110. {
  111. /*** IUnknown methods ***/
  112. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  113. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  114. STDMETHOD_(ULONG,Release)(THIS) PURE;
  115. /*** IDirect3D methods ***/
  116. STDMETHOD(Initialize)(THIS_ REFCLSID) PURE;
  117. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  118. STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
  119. STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL*,IUnknown*) PURE;
  120. STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT*,IUnknown*) PURE;
  121. STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  122. };
  123. typedef struct IDirect3D *LPDIRECT3D;
  124. #if !defined(__cplusplus) || defined(CINTERFACE)
  125. #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  126. #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
  127. #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
  128. #define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  129. #define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  130. #define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  131. #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  132. #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  133. #define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  134. #else
  135. #define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  136. #define IDirect3D_AddRef(p) (p)->AddRef()
  137. #define IDirect3D_Release(p) (p)->Release()
  138. #define IDirect3D_Initialize(p,a) (p)->Initialize(a)
  139. #define IDirect3D_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  140. #define IDirect3D_CreateLight(p,a,b) (p)->CreateLight(a,b)
  141. #define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  142. #define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  143. #define IDirect3D_FindDevice(p,a,b) (p)->FindDevice(a,b)
  144. #endif
  145. #undef INTERFACE
  146. #define INTERFACE IDirect3D2
  147. DECLARE_INTERFACE_(IDirect3D2, IUnknown)
  148. {
  149. /*** IUnknown methods ***/
  150. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  151. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  152. STDMETHOD_(ULONG,Release)(THIS) PURE;
  153. /*** IDirect3D2 methods ***/
  154. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  155. STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
  156. STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2*,IUnknown*) PURE;
  157. STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2*,IUnknown*) PURE;
  158. STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  159. STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE,LPDIRECT3DDEVICE2*) PURE;
  160. };
  161. typedef struct IDirect3D2 *LPDIRECT3D2;
  162. #if !defined(__cplusplus) || defined(CINTERFACE)
  163. #define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  164. #define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
  165. #define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
  166. #define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  167. #define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  168. #define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  169. #define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  170. #define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  171. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  172. #else
  173. #define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  174. #define IDirect3D2_AddRef(p) (p)->AddRef()
  175. #define IDirect3D2_Release(p) (p)->Release()
  176. #define IDirect3D2_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  177. #define IDirect3D2_CreateLight(p,a,b) (p)->CreateLight(a,b)
  178. #define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  179. #define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  180. #define IDirect3D2_FindDevice(p,a,b) (p)->FindDevice(a,b)
  181. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  182. #endif
  183. #undef INTERFACE
  184. #define INTERFACE IDirect3D3
  185. DECLARE_INTERFACE_(IDirect3D3, IUnknown)
  186. {
  187. /*** IUnknown methods ***/
  188. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  189. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  190. STDMETHOD_(ULONG,Release)(THIS) PURE;
  191. /*** IDirect3D3 methods ***/
  192. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  193. STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,LPUNKNOWN) PURE;
  194. STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3*,LPUNKNOWN) PURE;
  195. STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3*,LPUNKNOWN) PURE;
  196. STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  197. STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE4,LPDIRECT3DDEVICE3*,LPUNKNOWN) PURE;
  198. STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER*,DWORD,LPUNKNOWN) PURE;
  199. STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  200. STDMETHOD(EvictManagedTextures)(THIS) PURE;
  201. };
  202. typedef struct IDirect3D3 *LPDIRECT3D3;
  203. #if !defined(__cplusplus) || defined(CINTERFACE)
  204. #define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  205. #define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p)
  206. #define IDirect3D3_Release(p) (p)->lpVtbl->Release(p)
  207. #define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  208. #define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  209. #define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  210. #define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  211. #define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  212. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
  213. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d)
  214. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
  215. #define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
  216. #else
  217. #define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  218. #define IDirect3D3_AddRef(p) (p)->AddRef()
  219. #define IDirect3D3_Release(p) (p)->Release()
  220. #define IDirect3D3_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  221. #define IDirect3D3_CreateLight(p,a,b) (p)->CreateLight(a,b)
  222. #define IDirect3D3_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  223. #define IDirect3D3_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  224. #define IDirect3D3_FindDevice(p,a,b) (p)->FindDevice(a,b)
  225. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d)
  226. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d)
  227. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
  228. #define IDirect3D3_EvictManagedTextures(p) (p)->EvictManagedTextures()
  229. #endif
  230. /*
  231. * Direct3D Device interfaces
  232. */
  233. #undef INTERFACE
  234. #define INTERFACE IDirect3DDevice
  235. DECLARE_INTERFACE_(IDirect3DDevice, IUnknown)
  236. {
  237. /*** IUnknown methods ***/
  238. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  239. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  240. STDMETHOD_(ULONG,Release)(THIS) PURE;
  241. /*** IDirect3DDevice methods ***/
  242. STDMETHOD(Initialize)(THIS_ LPDIRECT3D,LPGUID,LPD3DDEVICEDESC) PURE;
  243. STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  244. STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE,LPDIRECT3DTEXTURE) PURE;
  245. STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC,LPDIRECT3DEXECUTEBUFFER*,IUnknown*) PURE;
  246. STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  247. STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD) PURE;
  248. STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
  249. STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
  250. STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT,LPDIRECT3DVIEWPORT*,DWORD) PURE;
  251. STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD,LPD3DRECT) PURE;
  252. STDMETHOD(GetPickRecords)(THIS_ LPDWORD,LPD3DPICKRECORD) PURE;
  253. STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
  254. STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE) PURE;
  255. STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE,const LPD3DMATRIX) PURE;
  256. STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE,LPD3DMATRIX) PURE;
  257. STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE) PURE;
  258. STDMETHOD(BeginScene)(THIS) PURE;
  259. STDMETHOD(EndScene)(THIS) PURE;
  260. STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D*) PURE;
  261. };
  262. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  263. #if !defined(__cplusplus) || defined(CINTERFACE)
  264. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  265. #define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  266. #define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
  267. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  268. #define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  269. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  270. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c)
  271. #define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  272. #define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c)
  273. #define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  274. #define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  275. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  276. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d)
  277. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b)
  278. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  279. #define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a)
  280. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b)
  281. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b)
  282. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a)
  283. #define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  284. #define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
  285. #define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  286. #else
  287. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  288. #define IDirect3DDevice_AddRef(p) (p)->AddRef()
  289. #define IDirect3DDevice_Release(p) (p)->Release()
  290. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  291. #define IDirect3DDevice_GetCaps(p,a,b) (p)->GetCaps(a,b)
  292. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  293. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c)
  294. #define IDirect3DDevice_GetStats(p,a) (p)->GetStats(a)
  295. #define IDirect3DDevice_Execute(p,a,b,c) (p)->Execute(a,b,c)
  296. #define IDirect3DDevice_AddViewport(p,a) (p)->AddViewport(a)
  297. #define IDirect3DDevice_DeleteViewport(p,a) (p)->DeleteViewport(a)
  298. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  299. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->Pick(a,b,c,d)
  300. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->GetPickRecords(a,b)
  301. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  302. #define IDirect3DDevice_CreateMatrix(p,a) (p)->CreateMatrix(a)
  303. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->SetMatrix(a,b)
  304. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->GetMatrix(a,b)
  305. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->DeleteMatrix(a)
  306. #define IDirect3DDevice_BeginScene(p) (p)->BeginScene()
  307. #define IDirect3DDevice_EndScene(p) (p)->EndScene()
  308. #define IDirect3DDevice_GetDirect3D(p,a) (p)->GetDirect3D(a)
  309. #endif
  310. #undef INTERFACE
  311. #define INTERFACE IDirect3DDevice2
  312. DECLARE_INTERFACE_(IDirect3DDevice2, IUnknown)
  313. {
  314. /*** IUnknown methods ***/
  315. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  316. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  317. STDMETHOD_(ULONG,Release)(THIS) PURE;
  318. /*** IDirect3DDevice2 methods ***/
  319. STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  320. STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2,LPDIRECT3DTEXTURE2) PURE;
  321. STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  322. STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  323. STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  324. STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2,LPDIRECT3DVIEWPORT2*,DWORD) PURE;
  325. STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
  326. STDMETHOD(BeginScene)(THIS) PURE;
  327. STDMETHOD(EndScene)(THIS) PURE;
  328. STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2*) PURE;
  329. STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  330. STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *) PURE;
  331. STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE,DWORD) PURE;
  332. STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
  333. STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,DWORD) PURE;
  334. STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE;
  335. STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
  336. STDMETHOD(Index)(THIS_ WORD) PURE;
  337. STDMETHOD(End)(THIS_ DWORD) PURE;
  338. STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  339. STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  340. STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
  341. STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
  342. STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  343. STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  344. STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  345. STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE;
  346. STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  347. STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  348. STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  349. };
  350. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  351. #if !defined(__cplusplus) || defined(CINTERFACE)
  352. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  353. #define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
  354. #define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
  355. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  356. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  357. #define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  358. #define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  359. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  360. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  361. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  362. #define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  363. #define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
  364. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  365. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  366. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  367. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  368. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  369. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  370. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  371. #define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  372. #define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a)
  373. #define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a)
  374. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  375. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  376. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  377. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  378. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  379. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  380. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  381. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  382. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  383. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  384. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  385. #else
  386. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  387. #define IDirect3DDevice2_AddRef(p) (p)->AddRef()
  388. #define IDirect3DDevice2_Release(p) (p)->Release()
  389. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->GetCaps(a,b)
  390. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  391. #define IDirect3DDevice2_GetStats(p,a) (p)->GetStats(a)
  392. #define IDirect3DDevice2_AddViewport(p,a) (p)->AddViewport(a)
  393. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->DeleteViewport(a)
  394. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  395. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  396. #define IDirect3DDevice2_BeginScene(p) (p)->BeginScene()
  397. #define IDirect3DDevice2_EndScene(p) (p)->EndScene()
  398. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->GetDirect3D(a)
  399. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  400. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  401. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  402. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  403. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->Begin(a,b,c)
  404. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  405. #define IDirect3DDevice2_Vertex(p,a) (p)->Vertex(a)
  406. #define IDirect3DDevice2_Index(p,a) (p)->Index(a)
  407. #define IDirect3DDevice2_End(p,a) (p)->End(a)
  408. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  409. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  410. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->GetLightState(a,b)
  411. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->SetLightState(a,b)
  412. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->SetTransform(a,b)
  413. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->GetTransform(a,b)
  414. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  415. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  416. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  417. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->SetClipStatus(a)
  418. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->GetClipStatus(a)
  419. #endif
  420. #undef INTERFACE
  421. #define INTERFACE IDirect3DDevice3
  422. DECLARE_INTERFACE_(IDirect3DDevice3, IUnknown)
  423. {
  424. /*** IUnknown methods ***/
  425. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  426. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  427. STDMETHOD_(ULONG,Release)(THIS) PURE;
  428. /*** IDirect3DDevice3 methods ***/
  429. STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  430. STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  431. STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  432. STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  433. STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3,LPDIRECT3DVIEWPORT3*,DWORD) PURE;
  434. STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  435. STDMETHOD(BeginScene)(THIS) PURE;
  436. STDMETHOD(EndScene)(THIS) PURE;
  437. STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3*) PURE;
  438. STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  439. STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *) PURE;
  440. STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4,DWORD) PURE;
  441. STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *) PURE;
  442. STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,DWORD,DWORD) PURE;
  443. STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  444. STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
  445. STDMETHOD(Index)(THIS_ WORD) PURE;
  446. STDMETHOD(End)(THIS_ DWORD) PURE;
  447. STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  448. STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  449. STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
  450. STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
  451. STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  452. STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  453. STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  454. STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  455. STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  456. STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  457. STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  458. STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,DWORD) PURE;
  459. STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,DWORD) PURE;
  460. STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,DWORD,DWORD,DWORD) PURE;
  461. STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,LPWORD,DWORD,DWORD) PURE;
  462. STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE;
  463. STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2 *) PURE;
  464. STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2) PURE;
  465. STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE;
  466. STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
  467. STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE;
  468. };
  469. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  470. #if !defined(__cplusplus) || defined(CINTERFACE)
  471. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  472. #define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p)
  473. #define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p)
  474. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  475. #define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  476. #define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  477. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  478. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  479. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  480. #define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  481. #define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p)
  482. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  483. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  484. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  485. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  486. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  487. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  488. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  489. #define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  490. #define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a)
  491. #define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a)
  492. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  493. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  494. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  495. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  496. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  497. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  498. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  499. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  500. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  501. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  502. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  503. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
  504. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
  505. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
  506. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e)
  507. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
  508. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
  509. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
  510. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
  511. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
  512. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
  513. #else
  514. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  515. #define IDirect3DDevice3_AddRef(p) (p)->AddRef()
  516. #define IDirect3DDevice3_Release(p) (p)->Release()
  517. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->GetCaps(a,b)
  518. #define IDirect3DDevice3_GetStats(p,a) (p)->GetStats(a)
  519. #define IDirect3DDevice3_AddViewport(p,a) (p)->AddViewport(a)
  520. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->DeleteViewport(a)
  521. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  522. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  523. #define IDirect3DDevice3_BeginScene(p) (p)->BeginScene()
  524. #define IDirect3DDevice3_EndScene(p) (p)->EndScene()
  525. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->GetDirect3D(a)
  526. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  527. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  528. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  529. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  530. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->Begin(a,b,c)
  531. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  532. #define IDirect3DDevice3_Vertex(p,a) (p)->Vertex(a)
  533. #define IDirect3DDevice3_Index(p,a) (p)->Index(a)
  534. #define IDirect3DDevice3_End(p,a) (p)->End(a)
  535. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  536. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  537. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->GetLightState(a,b)
  538. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->SetLightState(a,b)
  539. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->SetTransform(a,b)
  540. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->GetTransform(a,b)
  541. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  542. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  543. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  544. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->SetClipStatus(a)
  545. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->GetClipStatus(a)
  546. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
  547. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
  548. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
  549. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e)
  550. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
  551. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->GetTexture(a,b)
  552. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->SetTexture(a,b)
  553. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
  554. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
  555. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->ValidateDevice(a)
  556. #endif
  557. /*
  558. * Execute Buffer interface
  559. */
  560. #undef INTERFACE
  561. #define INTERFACE IDirect3DExecuteBuffer
  562. DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown)
  563. {
  564. /*** IUnknown methods ***/
  565. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  566. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  567. STDMETHOD_(ULONG,Release)(THIS) PURE;
  568. /*** IDirect3DExecuteBuffer methods ***/
  569. STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPD3DEXECUTEBUFFERDESC) PURE;
  570. STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC) PURE;
  571. STDMETHOD(Unlock)(THIS) PURE;
  572. STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
  573. STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
  574. STDMETHOD(Validate)(THIS_ LPDWORD,LPD3DVALIDATECALLBACK,LPVOID,DWORD) PURE;
  575. STDMETHOD(Optimize)(THIS_ DWORD) PURE;
  576. };
  577. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  578. #if !defined(__cplusplus) || defined(CINTERFACE)
  579. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  580. #define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  581. #define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
  582. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  583. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a)
  584. #define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  585. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a)
  586. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a)
  587. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d)
  588. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a)
  589. #else
  590. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  591. #define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef()
  592. #define IDirect3DExecuteBuffer_Release(p) (p)->Release()
  593. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  594. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->Lock(a)
  595. #define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock()
  596. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a)
  597. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a)
  598. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d)
  599. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->Optimize(a)
  600. #endif
  601. /*
  602. * Light interfaces
  603. */
  604. #undef INTERFACE
  605. #define INTERFACE IDirect3DLight
  606. DECLARE_INTERFACE_(IDirect3DLight, IUnknown)
  607. {
  608. /*** IUnknown methods ***/
  609. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  610. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  611. STDMETHOD_(ULONG,Release)(THIS) PURE;
  612. /*** IDirect3DLight methods ***/
  613. STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  614. STDMETHOD(SetLight)(THIS_ LPD3DLIGHT) PURE;
  615. STDMETHOD(GetLight)(THIS_ LPD3DLIGHT) PURE;
  616. };
  617. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  618. #if !defined(__cplusplus) || defined(CINTERFACE)
  619. #define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  620. #define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
  621. #define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
  622. #define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  623. #define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a)
  624. #define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a)
  625. #else
  626. #define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  627. #define IDirect3DLight_AddRef(p) (p)->AddRef()
  628. #define IDirect3DLight_Release(p) (p)->Release()
  629. #define IDirect3DLight_Initialize(p,a) (p)->Initialize(a)
  630. #define IDirect3DLight_SetLight(p,a) (p)->SetLight(a)
  631. #define IDirect3DLight_GetLight(p,a) (p)->GetLight(a)
  632. #endif
  633. /*
  634. * Material interfaces
  635. */
  636. #undef INTERFACE
  637. #define INTERFACE IDirect3DMaterial
  638. DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown)
  639. {
  640. /*** IUnknown methods ***/
  641. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  642. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  643. STDMETHOD_(ULONG,Release)(THIS) PURE;
  644. /*** IDirect3DMaterial methods ***/
  645. STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  646. STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  647. STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  648. STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DMATERIALHANDLE) PURE;
  649. STDMETHOD(Reserve)(THIS) PURE;
  650. STDMETHOD(Unreserve)(THIS) PURE;
  651. };
  652. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  653. #if !defined(__cplusplus) || defined(CINTERFACE)
  654. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  655. #define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
  656. #define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
  657. #define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  658. #define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  659. #define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  660. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  661. #define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
  662. #define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
  663. #else
  664. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  665. #define IDirect3DMaterial_AddRef(p) (p)->AddRef()
  666. #define IDirect3DMaterial_Release(p) (p)->Release()
  667. #define IDirect3DMaterial_Initialize(p,a) (p)->Initialize(a)
  668. #define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a)
  669. #define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a)
  670. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b)
  671. #define IDirect3DMaterial_Reserve(p) (p)->Reserve()
  672. #define IDirect3DMaterial_Unreserve(p) (p)->Unreserve()
  673. #endif
  674. #undef INTERFACE
  675. #define INTERFACE IDirect3DMaterial2
  676. DECLARE_INTERFACE_(IDirect3DMaterial2, IUnknown)
  677. {
  678. /*** IUnknown methods ***/
  679. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  680. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  681. STDMETHOD_(ULONG,Release)(THIS) PURE;
  682. /*** IDirect3DMaterial2 methods ***/
  683. STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  684. STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  685. STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DMATERIALHANDLE) PURE;
  686. };
  687. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  688. #if !defined(__cplusplus) || defined(CINTERFACE)
  689. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  690. #define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
  691. #define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
  692. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  693. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  694. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  695. #else
  696. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  697. #define IDirect3DMaterial2_AddRef(p) (p)->AddRef()
  698. #define IDirect3DMaterial2_Release(p) (p)->Release()
  699. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a)
  700. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a)
  701. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  702. #endif
  703. #undef INTERFACE
  704. #define INTERFACE IDirect3DMaterial3
  705. DECLARE_INTERFACE_(IDirect3DMaterial3, IUnknown)
  706. {
  707. /*** IUnknown methods ***/
  708. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  709. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  710. STDMETHOD_(ULONG,Release)(THIS) PURE;
  711. /*** IDirect3DMaterial3 methods ***/
  712. STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  713. STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  714. STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3,LPD3DMATERIALHANDLE) PURE;
  715. };
  716. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  717. #if !defined(__cplusplus) || defined(CINTERFACE)
  718. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  719. #define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p)
  720. #define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p)
  721. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  722. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  723. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  724. #else
  725. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  726. #define IDirect3DMaterial3_AddRef(p) (p)->AddRef()
  727. #define IDirect3DMaterial3_Release(p) (p)->Release()
  728. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a)
  729. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a)
  730. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b)
  731. #endif
  732. /*
  733. * Texture interfaces
  734. */
  735. #undef INTERFACE
  736. #define INTERFACE IDirect3DTexture
  737. DECLARE_INTERFACE_(IDirect3DTexture, IUnknown)
  738. {
  739. /*** IUnknown methods ***/
  740. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  741. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  742. STDMETHOD_(ULONG,Release)(THIS) PURE;
  743. /*** IDirect3DTexture methods ***/
  744. STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPDIRECTDRAWSURFACE) PURE;
  745. STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DTEXTUREHANDLE) PURE;
  746. STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
  747. STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE) PURE;
  748. STDMETHOD(Unload)(THIS) PURE;
  749. };
  750. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  751. #if !defined(__cplusplus) || defined(CINTERFACE)
  752. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  753. #define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
  754. #define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
  755. #define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  756. #define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  757. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  758. #define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a)
  759. #define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
  760. #else
  761. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  762. #define IDirect3DTexture_AddRef(p) (p)->AddRef()
  763. #define IDirect3DTexture_Release(p) (p)->Release()
  764. #define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b)
  765. #define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b)
  766. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  767. #define IDirect3DTexture_Load(p,a) (p)->Load(a)
  768. #define IDirect3DTexture_Unload(p) (p)->Unload()
  769. #endif
  770. #undef INTERFACE
  771. #define INTERFACE IDirect3DTexture2
  772. DECLARE_INTERFACE_(IDirect3DTexture2, IUnknown)
  773. {
  774. /*** IUnknown methods ***/
  775. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  776. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  777. STDMETHOD_(ULONG,Release)(THIS) PURE;
  778. /*** IDirect3DTexture2 methods ***/
  779. STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DTEXTUREHANDLE) PURE;
  780. STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
  781. STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2) PURE;
  782. };
  783. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  784. #if !defined(__cplusplus) || defined(CINTERFACE)
  785. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  786. #define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
  787. #define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
  788. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  789. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  790. #define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a)
  791. #else
  792. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  793. #define IDirect3DTexture2_AddRef(p) (p)->AddRef()
  794. #define IDirect3DTexture2_Release(p) (p)->Release()
  795. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  796. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  797. #define IDirect3DTexture2_Load(p,a) (p)->Load(a)
  798. #endif
  799. /*
  800. * Viewport interfaces
  801. */
  802. #undef INTERFACE
  803. #define INTERFACE IDirect3DViewport
  804. DECLARE_INTERFACE_(IDirect3DViewport, IUnknown)
  805. {
  806. /*** IUnknown methods ***/
  807. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  808. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  809. STDMETHOD_(ULONG,Release)(THIS) PURE;
  810. /*** IDirect3DViewport methods ***/
  811. STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  812. STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  813. STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  814. STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  815. STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  816. STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  817. STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  818. STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  819. STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  820. STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  821. STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  822. STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  823. STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  824. };
  825. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  826. #if !defined(__cplusplus) || defined(CINTERFACE)
  827. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  828. #define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
  829. #define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
  830. #define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  831. #define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  832. #define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  833. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  834. #define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  835. #define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  836. #define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  837. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  838. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  839. #define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  840. #define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  841. #define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  842. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  843. #else
  844. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  845. #define IDirect3DViewport_AddRef(p) (p)->AddRef()
  846. #define IDirect3DViewport_Release(p) (p)->Release()
  847. #define IDirect3DViewport_Initialize(p,a) (p)->Initialize(a)
  848. #define IDirect3DViewport_GetViewport(p,a) (p)->GetViewport(a)
  849. #define IDirect3DViewport_SetViewport(p,a) (p)->SetViewport(a)
  850. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  851. #define IDirect3DViewport_LightElements(p,a,b) (p)->LightElements(a,b)
  852. #define IDirect3DViewport_SetBackground(p,a) (p)->SetBackground(a)
  853. #define IDirect3DViewport_GetBackground(p,a,b) (p)->GetBackground(a,b)
  854. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  855. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  856. #define IDirect3DViewport_Clear(p,a,b,c) (p)->Clear(a,b,c)
  857. #define IDirect3DViewport_AddLight(p,a) (p)->AddLight(a)
  858. #define IDirect3DViewport_DeleteLight(p,a) (p)->DeleteLight(a)
  859. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  860. #endif
  861. #undef INTERFACE
  862. #define INTERFACE IDirect3DViewport2
  863. DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport)
  864. {
  865. /*** IUnknown methods ***/
  866. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  867. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  868. STDMETHOD_(ULONG,Release)(THIS) PURE;
  869. /*** IDirect3DViewport methods ***/
  870. STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  871. STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  872. STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  873. STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  874. STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  875. STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  876. STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  877. STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  878. STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  879. STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  880. STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  881. STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  882. STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  883. STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  884. STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  885. };
  886. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  887. #if !defined(__cplusplus) || defined(CINTERFACE)
  888. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  889. #define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
  890. #define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
  891. #define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  892. #define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  893. #define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  894. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  895. #define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  896. #define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  897. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  898. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  899. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  900. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  901. #define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  902. #define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  903. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  904. #define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  905. #define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  906. #else
  907. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  908. #define IDirect3DViewport2_AddRef(p) (p)->AddRef()
  909. #define IDirect3DViewport2_Release(p) (p)->Release()
  910. #define IDirect3DViewport2_Initialize(p,a) (p)->Initialize(a)
  911. #define IDirect3DViewport2_GetViewport(p,a) (p)->GetViewport(a)
  912. #define IDirect3DViewport2_SetViewport(p,a) (p)->SetViewport(a)
  913. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  914. #define IDirect3DViewport2_LightElements(p,a,b) (p)->LightElements(a,b)
  915. #define IDirect3DViewport2_SetBackground(p,a) (p)->SetBackground(a)
  916. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->GetBackground(a,b)
  917. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  918. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  919. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->Clear(a,b,c)
  920. #define IDirect3DViewport2_AddLight(p,a) (p)->AddLight(a)
  921. #define IDirect3DViewport2_DeleteLight(p,a) (p)->DeleteLight(a)
  922. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  923. #define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a)
  924. #define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a)
  925. #endif
  926. #undef INTERFACE
  927. #define INTERFACE IDirect3DViewport3
  928. DECLARE_INTERFACE_(IDirect3DViewport3, IDirect3DViewport2)
  929. {
  930. /*** IUnknown methods ***/
  931. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  932. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  933. STDMETHOD_(ULONG,Release)(THIS) PURE;
  934. /*** IDirect3DViewport2 methods ***/
  935. STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  936. STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  937. STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  938. STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  939. STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  940. STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  941. STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  942. STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  943. STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE4*,LPBOOL) PURE;
  944. STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  945. STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  946. STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  947. STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  948. STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  949. STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  950. STDMETHOD(Clear2)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE;
  951. };
  952. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  953. #if !defined(__cplusplus) || defined(CINTERFACE)
  954. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  955. #define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p)
  956. #define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p)
  957. #define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  958. #define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  959. #define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  960. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  961. #define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  962. #define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  963. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  964. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  965. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  966. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  967. #define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  968. #define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  969. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  970. #define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  971. #define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  972. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f)
  973. #else
  974. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  975. #define IDirect3DViewport3_AddRef(p) (p)->AddRef()
  976. #define IDirect3DViewport3_Release(p) (p)->Release()
  977. #define IDirect3DViewport3_Initialize(p,a) (p)->Initialize(a)
  978. #define IDirect3DViewport3_GetViewport(p,a) (p)->GetViewport(a)
  979. #define IDirect3DViewport3_SetViewport(p,a) (p)->SetViewport(a)
  980. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  981. #define IDirect3DViewport3_LightElements(p,a,b) (p)->LightElements(a,b)
  982. #define IDirect3DViewport3_SetBackground(p,a) (p)->SetBackground(a)
  983. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->GetBackground(a,b)
  984. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  985. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  986. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->Clear(a,b,c)
  987. #define IDirect3DViewport3_AddLight(p,a) (p)->AddLight(a)
  988. #define IDirect3DViewport3_DeleteLight(p,a) (p)->DeleteLight(a)
  989. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  990. #define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a)
  991. #define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a)
  992. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->Clear2(a,b,c,d,e,f)
  993. #endif
  994. #undef INTERFACE
  995. #define INTERFACE IDirect3DVertexBuffer
  996. DECLARE_INTERFACE_(IDirect3DVertexBuffer, IUnknown)
  997. {
  998. /*** IUnknown methods ***/
  999. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1000. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1001. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1002. /*** IDirect3DVertexBuffer methods ***/
  1003. STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE;
  1004. STDMETHOD(Unlock)(THIS) PURE;
  1005. STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER,DWORD,LPDIRECT3DDEVICE3,DWORD) PURE;
  1006. STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE;
  1007. STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3,DWORD) PURE;
  1008. };
  1009. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  1010. #if !defined(__cplusplus) || defined(CINTERFACE)
  1011. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1012. #define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  1013. #define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p)
  1014. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
  1015. #define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  1016. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
  1017. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
  1018. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
  1019. #else
  1020. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1021. #define IDirect3DVertexBuffer_AddRef(p) (p)->AddRef()
  1022. #define IDirect3DVertexBuffer_Release(p) (p)->Release()
  1023. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->Lock(a,b,c)
  1024. #define IDirect3DVertexBuffer_Unlock(p) (p)->Unlock()
  1025. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
  1026. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
  1027. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->Optimize(a,b)
  1028. #endif
  1029. /****************************************************************************
  1030. *
  1031. * Flags for IDirect3DDevice::NextViewport
  1032. *
  1033. ****************************************************************************/
  1034. /*
  1035. * Return the next viewport
  1036. */
  1037. #define D3DNEXT_NEXT 0x00000001l
  1038. /*
  1039. * Return the first viewport
  1040. */
  1041. #define D3DNEXT_HEAD 0x00000002l
  1042. /*
  1043. * Return the last viewport
  1044. */
  1045. #define D3DNEXT_TAIL 0x00000004l
  1046. /****************************************************************************
  1047. *
  1048. * Flags for DrawPrimitive/DrawIndexedPrimitive
  1049. * Also valid for Begin/BeginIndexed
  1050. * Also valid for VertexBuffer::CreateVertexBuffer
  1051. ****************************************************************************/
  1052. /*
  1053. * Wait until the device is ready to draw the primitive
  1054. * This will cause DP to not return DDERR_WASSTILLDRAWING
  1055. */
  1056. #define D3DDP_WAIT 0x00000001l
  1057. /*
  1058. * Hint that the primitives have been clipped by the application.
  1059. */
  1060. #define D3DDP_DONOTCLIP 0x00000004l
  1061. /*
  1062. * Hint that the extents need not be updated.
  1063. */
  1064. #define D3DDP_DONOTUPDATEEXTENTS 0x00000008l
  1065. /*
  1066. * Hint that the lighting should not be applied on vertices.
  1067. */
  1068. #define D3DDP_DONOTLIGHT 0x00000010l
  1069. /*
  1070. * Direct3D Errors
  1071. * DirectDraw error codes are used when errors not specified here.
  1072. */
  1073. #define D3D_OK DD_OK
  1074. #define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
  1075. #define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
  1076. /*
  1077. * An invalid device was requested by the application.
  1078. */
  1079. #define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
  1080. #define D3DERR_INITFAILED MAKE_DDHRESULT(706)
  1081. /*
  1082. * SetRenderTarget attempted on a device that was
  1083. * QI'd off the render target.
  1084. */
  1085. #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
  1086. #define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
  1087. #define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
  1088. #define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
  1089. #define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
  1090. #define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
  1091. #define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
  1092. #define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
  1093. #define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
  1094. #define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
  1095. #define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
  1096. #define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
  1097. #define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
  1098. #define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
  1099. #define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
  1100. #define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
  1101. #define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
  1102. #define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
  1103. #define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
  1104. #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
  1105. #define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
  1106. #define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
  1107. #define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
  1108. #define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
  1109. #define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
  1110. #define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
  1111. #define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
  1112. #define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
  1113. #define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
  1114. #define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
  1115. #define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
  1116. #define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
  1117. #define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
  1118. #define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
  1119. #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
  1120. #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
  1121. #define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
  1122. #define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
  1123. #define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
  1124. #define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
  1125. #define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
  1126. #define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
  1127. #define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
  1128. #define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
  1129. #define D3DERR_INBEGIN MAKE_DDHRESULT(770)
  1130. #define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
  1131. #define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
  1132. #define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
  1133. #define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
  1134. #define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
  1135. #define D3DERR_INVALIDVERTEXFORMAT MAKE_DDHRESULT(2048)
  1136. /*
  1137. * Attempted to CreateTexture on a surface that had a color key
  1138. */
  1139. #define D3DERR_COLORKEYATTACHED MAKE_DDHRESULT(2050)
  1140. #define D3DERR_VERTEXBUFFEROPTIMIZED MAKE_DDHRESULT(2060)
  1141. #define D3DERR_VBUF_CREATE_FAILED MAKE_DDHRESULT(2061)
  1142. #define D3DERR_VERTEXBUFFERLOCKED MAKE_DDHRESULT(2062)
  1143. #define D3DERR_ZBUFFER_NOTPRESENT MAKE_DDHRESULT(2070)
  1144. #define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071)
  1145. #define D3DERR_WRONGTEXTUREFORMAT MAKE_DDHRESULT(2072)
  1146. #define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_DDHRESULT(2073)
  1147. #define D3DERR_UNSUPPORTEDCOLORARG MAKE_DDHRESULT(2074)
  1148. #define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_DDHRESULT(2075)
  1149. #define D3DERR_UNSUPPORTEDALPHAARG MAKE_DDHRESULT(2076)
  1150. #define D3DERR_TOOMANYOPERATIONS MAKE_DDHRESULT(2077)
  1151. #define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_DDHRESULT(2078)
  1152. #define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_DDHRESULT(2079)
  1153. #ifdef __cplusplus
  1154. };
  1155. #endif
  1156. #endif /* _D3D_H_ */