home *** CD-ROM | disk | FTP | other *** search
/ Microsoft DirectX SDK 6.1 / Dx6_1_Gold.iso / dxf / include / d3d.h next >
Encoding:
C/C++ Source or Header  |  1998-10-14  |  66.2 KB  |  1,322 lines

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