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.

392 lines
18 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995-1996 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. #ifdef _WIN32
  13. #define COM_NO_WINDOWS_H
  14. #include <objbase.h>
  15. #else
  16. #include "d3dcom.h"
  17. #endif
  18. #ifdef _WIN32
  19. #define D3DAPI WINAPI
  20. #else
  21. #define D3DAPI
  22. #endif
  23. /*
  24. * Interface IID's
  25. */
  26. #if defined( _WIN32 ) && !defined( _NO_COM)
  27. DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  28. DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  29. DEFINE_GUID( IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  30. DEFINE_GUID( IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  31. DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  32. DEFINE_GUID( IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. /*
  38. * Data structures
  39. */
  40. #ifdef __cplusplus
  41. /* 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined */
  42. struct IDirect3D;
  43. struct IDirect3DDevice;
  44. struct IDirect3DExecuteBuffer;
  45. struct IDirect3DLight;
  46. struct IDirect3DMaterial;
  47. struct IDirect3DTexture;
  48. struct IDirect3DViewport;
  49. typedef struct IDirect3D *LPDIRECT3D;
  50. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  51. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  52. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  53. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  54. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  55. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  56. #else
  57. typedef struct IDirect3D *LPDIRECT3D;
  58. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  59. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  60. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  61. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  62. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  63. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  64. #endif
  65. #include "d3dtypes.h"
  66. #include "d3dcaps.h"
  67. /*
  68. * IDirect3D
  69. */
  70. #undef INTERFACE
  71. #define INTERFACE IDirect3D
  72. DECLARE_INTERFACE_(IDirect3D, IUnknown)
  73. {
  74. /*** IUnknown methods ***/
  75. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  76. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  77. STDMETHOD_(ULONG, Release) (THIS) PURE;
  78. /*** IDirect3D methods ***/
  79. STDMETHOD(Initialize) (THIS_ REFIID) PURE;
  80. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
  81. STDMETHOD(CreateLight) (THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE;
  82. STDMETHOD(CreateMaterial) (THIS_ LPDIRECT3DMATERIAL*, IUnknown*) PURE;
  83. STDMETHOD(CreateViewport) (THIS_ LPDIRECT3DVIEWPORT*, IUnknown*) PURE;
  84. STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
  85. };
  86. #if !defined(__cplusplus) || defined(CINTERFACE)
  87. #define IDirect3D_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  88. #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
  89. #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
  90. #define IDirect3D_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  91. #define IDirect3D_EnumDevices(p, a, b) (p)->lpVtbl->EnumDevices(p, a, b)
  92. #define IDirect3D_CreateLight(p, a, b) (p)->lpVtbl->CreateLight(p, a, b)
  93. #define IDirect3D_CreateMaterial(p, a, b) (p)->lpVtbl->CreateMaterial(p, a, b)
  94. #define IDirect3D_CreateViewport(p, a, b) (p)->lpVtbl->CreateViewport(p, a, b)
  95. #define IDirect3D_FindDevice(p, a, b) (p)->lpVtbl->FindDevice(p, a, b)
  96. #endif
  97. /*
  98. * IDirect3DDevice
  99. */
  100. #undef INTERFACE
  101. #define INTERFACE IDirect3DDevice
  102. DECLARE_INTERFACE_(IDirect3DDevice, IUnknown)
  103. {
  104. /*** IUnknown methods ***/
  105. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  106. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  107. STDMETHOD_(ULONG, Release) (THIS) PURE;
  108. /*** IDirect3DDevice methods ***/
  109. STDMETHOD(Initialize) (THIS_ LPDIRECT3D, LPGUID, LPD3DDEVICEDESC) PURE;
  110. STDMETHOD(GetCaps) (THIS_ LPD3DDEVICEDESC, LPD3DDEVICEDESC) PURE;
  111. STDMETHOD(SwapTextureHandles) (THIS_ LPDIRECT3DTEXTURE, LPDIRECT3DTEXTURE) PURE;
  112. STDMETHOD(CreateExecuteBuffer) (THIS_ LPD3DEXECUTEBUFFERDESC, LPDIRECT3DEXECUTEBUFFER*, IUnknown*) PURE;
  113. STDMETHOD(GetStats) (THIS_ LPD3DSTATS) PURE;
  114. STDMETHOD(Execute) (THIS_ LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD) PURE;
  115. STDMETHOD(AddViewport) (THIS_ LPDIRECT3DVIEWPORT) PURE;
  116. STDMETHOD(DeleteViewport) (THIS_ LPDIRECT3DVIEWPORT) PURE;
  117. STDMETHOD(NextViewport) (THIS_ LPDIRECT3DVIEWPORT, LPDIRECT3DVIEWPORT*, DWORD) PURE;
  118. STDMETHOD(Pick) (THIS_ LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD, LPD3DRECT) PURE;
  119. STDMETHOD(GetPickRecords)(THIS_ LPDWORD, LPD3DPICKRECORD) PURE;
  120. STDMETHOD(EnumTextureFormats) (THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK, LPVOID) PURE;
  121. STDMETHOD(CreateMatrix) (THIS_ LPD3DMATRIXHANDLE) PURE;
  122. STDMETHOD(SetMatrix) (THIS_ D3DMATRIXHANDLE, LPD3DMATRIX) PURE;
  123. STDMETHOD(GetMatrix) (THIS_ D3DMATRIXHANDLE, LPD3DMATRIX) PURE;
  124. STDMETHOD(DeleteMatrix) (THIS_ D3DMATRIXHANDLE) PURE;
  125. STDMETHOD_(HRESULT, BeginScene) (THIS) PURE;
  126. STDMETHOD_(HRESULT, EndScene) (THIS) PURE;
  127. STDMETHOD(GetDirect3D) (THIS_ LPDIRECT3D*) PURE;
  128. };
  129. #if !defined(__cplusplus) || defined(CINTERFACE)
  130. #define IDirect3DDevice_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  131. #define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  132. #define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
  133. #define IDirect3DDevice_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  134. #define IDirect3DDevice_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  135. #define IDirect3DDevice_SwapTextureHandles(p, a, b) (p)->lpVtbl->SwapTextureHandles(p, a, b)
  136. #define IDirect3DDevice_CreateExecuteBuffer(p, a, b, c) (p)->lpVtbl->CreateExecuteBuffer(p, a, b, c)
  137. #define IDirect3DDevice_GetStats(p, a) (p)->lpVtbl->CreateViewport(p, a)
  138. #define IDirect3DDevice_Execute(p, a, b, c) (p)->lpVtbl->Execute(p, a, b, c)
  139. #define IDirect3DDevice_AddViewport(p, a) (p)->lpVtbl->AddViewport(p, a)
  140. #define IDirect3DDevice_DeleteViewport(p, a) (p)->lpVtbl->DeleteViewport(p, a)
  141. #define IDirect3DDevice_NextViewport(p, a, b) (p)->lpVtbl->NextViewport(p, a, b)
  142. #define IDirect3DDevice_Pick(p, a, b, c, d) (p)->lpVtbl->Pick(p, a, b, c, d)
  143. #define IDirect3DDevice_GetPickRecords(p, a, b) (p)->lpVtbl->GetPickRecords(p, a, b)
  144. #define IDirect3DDevice_EnumTextureFormats(p, a, b) (p)->lpVtbl->EnumTextureFormats(p, a, b)
  145. #define IDirect3DDevice_CreateMatrix(p, a) (p)->lpVtbl->CreateMatrix(p, a)
  146. #define IDirect3DDevice_SetMatrix(p, a, b) (p)->lpVtbl->SetMatrix(p, a, b)
  147. #define IDirect3DDevice_GetMatrix(p, a, b) (p)->lpVtbl->GetMatrix(p, a, b)
  148. #define IDirect3DDevice_DeleteMatrix(p, a) (p)->lpVtbl->DeleteMatrix(p, a)
  149. #define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  150. #define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
  151. #define IDirect3DDevice_GetDirect3D(p, a) (p)->lpVtbl->GetDirect3D(p, a)
  152. #endif
  153. /*
  154. * IDirect3DExecuteBuffer
  155. */
  156. #undef INTERFACE
  157. #define INTERFACE IDirect3DExecuteBuffer
  158. DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown)
  159. {
  160. /*** IUnknown methods ***/
  161. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  162. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  163. STDMETHOD_(ULONG, Release) (THIS) PURE;
  164. /*** IDirect3DExecuteBuffer methods ***/
  165. STDMETHOD(Initialize) (THIS_ LPDIRECT3DDEVICE, LPD3DEXECUTEBUFFERDESC) PURE;
  166. STDMETHOD(Lock) (THIS_ LPD3DEXECUTEBUFFERDESC) PURE;
  167. STDMETHOD_(HRESULT, Unlock) (THIS) PURE;
  168. STDMETHOD(SetExecuteData) (THIS_ LPD3DEXECUTEDATA) PURE;
  169. STDMETHOD(GetExecuteData) (THIS_ LPD3DEXECUTEDATA) PURE;
  170. STDMETHOD(Validate) (THIS_ LPDWORD, LPD3DVALIDATECALLBACK, LPVOID, DWORD) PURE;
  171. STDMETHOD(Optimize) (THIS_ DWORD) PURE;
  172. };
  173. #if !defined(__cplusplus) || defined(CINTERFACE)
  174. #define IDirect3DExecuteBuffer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  175. #define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  176. #define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
  177. #define IDirect3DExecuteBuffer_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  178. #define IDirect3DExecuteBuffer_Lock(p, a) (p)->lpVtbl->Lock(p, a)
  179. #define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  180. #define IDirect3DExecuteBuffer_SetExecuteData(p, a) (p)->lpVtbl->SetExecuteData(p, a)
  181. #define IDirect3DExecuteBuffer_Validate(p, a, b, c, d) (p)->lpVtbl->Validata(p, a, b, c, d)
  182. #endif
  183. /*
  184. * Flags for execute buffer calls
  185. */
  186. #define D3DNEXT_NEXT 0x00000001l
  187. #define D3DNEXT_HEAD 0x00000002l
  188. #define D3DNEXT_TAIL 0x00000004l
  189. /*
  190. * IDirect3DLight
  191. */
  192. #undef INTERFACE
  193. #define INTERFACE IDirect3DLight
  194. DECLARE_INTERFACE_(IDirect3DLight, IUnknown)
  195. {
  196. /*** IUnknown methods ***/
  197. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  198. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  199. STDMETHOD_(ULONG, Release) (THIS) PURE;
  200. /*** IDirect3DLight methods ***/
  201. STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
  202. STDMETHOD(SetLight) (THIS_ LPD3DLIGHT) PURE;
  203. STDMETHOD(GetLight) (THIS_ LPD3DLIGHT) PURE;
  204. };
  205. #if !defined(__cplusplus) || defined(CINTERFACE)
  206. #define IDirect3DLight_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  207. #define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
  208. #define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
  209. #define IDirect3DLight_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  210. #define IDirect3DLight_SetLight(p, a) (p)->lpVtbl->SetLight(p, a)
  211. #define IDirect3DLight_GetLight(p, a) (p)->lpVtbl->GetLight(p, a)
  212. #endif
  213. /*
  214. * IDirect3DMaterial
  215. */
  216. #undef INTERFACE
  217. #define INTERFACE IDirect3DMaterial
  218. DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown)
  219. {
  220. /*** IUnknown methods ***/
  221. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  222. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  223. STDMETHOD_(ULONG, Release) (THIS) PURE;
  224. /*** IDirect3DMaterial methods ***/
  225. STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
  226. STDMETHOD(SetMaterial) (THIS_ LPD3DMATERIAL) PURE;
  227. STDMETHOD(GetMaterial) (THIS_ LPD3DMATERIAL) PURE;
  228. STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE, LPD3DMATERIALHANDLE) PURE;
  229. STDMETHOD_(HRESULT, Reserve) (THIS) PURE;
  230. STDMETHOD_(HRESULT, Unreserve) (THIS) PURE;
  231. };
  232. #if !defined(__cplusplus) || defined(CINTERFACE)
  233. #define IDirect3DMaterial_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  234. #define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
  235. #define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
  236. #define IDirect3DMaterial_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  237. #define IDirect3DMaterial_SetMaterial(p, a) (p)->lpVtbl->SetMaterial(p, a)
  238. #define IDirect3DMaterial_GetMaterial(p, a) (p)->lpVtbl->GetMaterial(p, a)
  239. #define IDirect3DMaterial_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
  240. #define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
  241. #define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
  242. #endif
  243. /*
  244. * IDirect3DTexture
  245. */
  246. #undef INTERFACE
  247. #define INTERFACE IDirect3DTexture
  248. DECLARE_INTERFACE_(IDirect3DTexture, IUnknown)
  249. {
  250. /*** IUnknown methods ***/
  251. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  252. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  253. STDMETHOD_(ULONG, Release) (THIS) PURE;
  254. /*** IDirect3DTexture methods ***/
  255. STDMETHOD(Initialize) (THIS_ LPDIRECT3DDEVICE, LPDIRECTDRAWSURFACE) PURE;
  256. STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE, LPD3DTEXTUREHANDLE) PURE;
  257. STDMETHOD(PaletteChanged) (THIS_ DWORD, DWORD) PURE;
  258. STDMETHOD(Load) (THIS_ LPDIRECT3DTEXTURE) PURE;
  259. STDMETHOD_(HRESULT, Unload) (THIS) PURE;
  260. };
  261. #if !defined(__cplusplus) || defined(CINTERFACE)
  262. #define IDirect3DTexture_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  263. #define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
  264. #define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
  265. #define IDirect3DTexture_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  266. #define IDirect3DTexture_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
  267. #define IDirect3DTexture_PaletteChanged(p, a, b) (p)->lpVtbl->PaletteChanged(p, a, b)
  268. #define IDirect3DTexture_Load(p, a) (p)->lpVtbl->Load(p, a)
  269. #define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
  270. #endif
  271. /*
  272. * IDirect3DViewport
  273. */
  274. #undef INTERFACE
  275. #define INTERFACE IDirect3DViewport
  276. DECLARE_INTERFACE_(IDirect3DViewport, IUnknown)
  277. {
  278. /*** IUnknown methods ***/
  279. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  280. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  281. STDMETHOD_(ULONG, Release) (THIS) PURE;
  282. /*** IDirect3DViewport methods ***/
  283. STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
  284. STDMETHOD(GetViewport) (THIS_ LPD3DVIEWPORT) PURE;
  285. STDMETHOD(SetViewport) (THIS_ LPD3DVIEWPORT) PURE;
  286. STDMETHOD(TransformVertices) (THIS_ DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD) PURE;
  287. STDMETHOD(LightElements) (THIS_ DWORD, LPD3DLIGHTDATA) PURE;
  288. STDMETHOD(SetBackground) (THIS_ D3DMATERIALHANDLE) PURE;
  289. STDMETHOD(GetBackground) (THIS_ LPD3DMATERIALHANDLE, LPBOOL) PURE;
  290. STDMETHOD(SetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE) PURE;
  291. STDMETHOD(GetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE*, LPBOOL) PURE;
  292. STDMETHOD(Clear) (THIS_ DWORD, LPD3DRECT, DWORD) PURE;
  293. STDMETHOD(AddLight) (THIS_ LPDIRECT3DLIGHT) PURE;
  294. STDMETHOD(DeleteLight) (THIS_ LPDIRECT3DLIGHT) PURE;
  295. STDMETHOD(NextLight) (THIS_ LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD) PURE;
  296. };
  297. #if !defined(__cplusplus) || defined(CINTERFACE)
  298. #define IDirect3DViewport_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  299. #define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
  300. #define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
  301. #define IDirect3DViewport_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  302. #define IDirect3DViewport_GetViewport(p, a) (p)->lpVtbl->GetViewport(p, a)
  303. #define IDirect3DViewport_SetViewport(p, a) (p)->lpVtbl->SetViewport(p, a)
  304. #define IDirect3DViewport_TransformVertices(p, a, b, c, d) (p)->lpVtbl->TransformVertices(p, a, b, c, d)
  305. #define IDirect3DViewport_LightElements(p, a, b) (p)->lpVtbl->LightElements(p, a, b)
  306. #define IDirect3DViewport_SetBackground(p, a) (p)->lpVtbl->SetBackground(p, a)
  307. #define IDirect3DViewport_GetBackground(p, a, b) (p)->lpVtbl->GetBackground(p, a, b)
  308. #define IDirect3DViewport_Clear(p, a, b, c) (p)->lpVtbl->Clear(p, a, b, c)
  309. #define IDirect3DViewport_AddLight(p, a) (p)->lpVtbl->AddLight(p, a)
  310. #define IDirect3DViewport_DeleteLight(p, a) (p)->lpVtbl->DeleteLight(p, a)
  311. #define IDirect3DViewport_NextLight(p, a, b, c) (p)->lpVtbl->NextLight(p, a, b, c)
  312. #endif
  313. /*
  314. * Direct3D Errors
  315. * DirectDraw error codes are used when errors not specified here.
  316. */
  317. #define D3D_OK DD_OK
  318. #define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
  319. #define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
  320. #define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
  321. #define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
  322. #define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
  323. #define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
  324. #define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
  325. #define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
  326. #define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
  327. #define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
  328. #define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
  329. #define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
  330. #define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
  331. #define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
  332. #define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
  333. #define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
  334. #define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
  335. #define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
  336. #define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
  337. #define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
  338. #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
  339. #define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
  340. #define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
  341. #define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
  342. #define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
  343. #define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
  344. #define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
  345. #define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
  346. #define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
  347. #define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
  348. #define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
  349. #define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
  350. #define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
  351. #define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
  352. #ifdef __cplusplus
  353. };
  354. #endif
  355. #endif /* _D3D_H_ */