Leaked source code of windows server 2003
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.

899 lines
37 KiB

  1. sinclude(`d3dmkhdr.m4')dnl This file must be preprocessed by the m4 preprocessor.
  2. /*==========================================================================;
  3. *
  4. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  5. *
  6. * File: d3d.h
  7. * Content: Direct3D include file
  8. begindoc
  9. *
  10. * $Id: d3d.h,v 1.27 1995/11/21 14:42:44 sjl Exp $
  11. *
  12. * History:
  13. * Date By Reason
  14. * ==== == ======
  15. * 07/11/95 stevela Initial rev with this header.
  16. *
  17. * Special markers:
  18. *
  19. * Each special marker can either be applied to a single line
  20. * (appended to the end) or spread over a range. For example
  21. * suppose that ;mumble is a marker. Then you can either say
  22. *
  23. * blah blah blah ;mumble
  24. *
  25. * to apply the marker to a single line, or
  26. *
  27. * ;begin_mumble
  28. * blah blah
  29. * blah blah
  30. * blah blah
  31. * ;end_mumble
  32. *
  33. * to apply it to a range of lines.
  34. *
  35. *
  36. * Note that the command line to hsplit.exe must look like
  37. * this for these markers to work:
  38. *
  39. * hsplit -u -ta dx# -v #00
  40. *
  41. * where the two "#"s are the version of DX that the header
  42. * file is being generated for. They had better match, too.
  43. *
  44. *
  45. * Marker: ;public_300
  46. *
  47. * Lines tagged with this marker will appear in all header files
  48. * DX3 **and later**.
  49. * Use ;public_dx3 for lines that are specific to version 300 and
  50. * not to future versions.
  51. *
  52. * Marker: ;public_500
  53. *
  54. * Lines tagged with this marker will appear in all header files
  55. * DX5 **and later**.
  56. * Use ;public_dx5 for lines that are specific to version 500 and
  57. * not to future versions.
  58. *
  59. * Marker: ;public_600
  60. *
  61. * Lines tagged with this marker will appear in all header files
  62. * DX6 **and later**.
  63. * Use ;public_dx5 for lines that are specific to version 500 and
  64. * not to future versions.
  65. *
  66. * Marker: ;public_dx3
  67. * Marker: ;public_dx5
  68. * Marker: ;public_dx6
  69. *
  70. * Lines tagged with these markers will appear *only* in the DX3,
  71. * DX5, DX6 version of the header file.
  72. *
  73. * There should never be a ;public_dx5 since 500 is tha latest
  74. * version of the header file. Use ;public_500 for lines that
  75. * are new for version 500 and apply to all future versions.
  76. *
  77. * Marker: ;if_(DIRECT3D_VERSION)_500
  78. *
  79. * Lines tagged with this marker will appear only in the DX5
  80. * version of the header file. Furthermore, its appearance
  81. * in the header file will be bracketed with
  82. *
  83. * #if(DIRECT3D_VERSION) >= 0x0500
  84. * ...
  85. * #endif
  86. *
  87. * Try to avoid using this marker, because the number _500 needs
  88. * to change as each new beta version is released. (Yuck.)
  89. *
  90. * If you choose to use this as a bracketing tag, the end
  91. * tag is ";end" and not ";end_if_(DIRECTINPUT_VERSION)_500".
  92. *
  93. * Marker: ;if_(DIRECT3D_VERSION)_600
  94. *
  95. * Same as for DIRECT3D_VERSION_500
  96. *
  97. * Note that ;begin_internal, ;end_internal can no longer be nested
  98. * inside a ;begin_public_*, ;end_public_*. Either do an ;end_public
  99. * before the ;begin_internal, or do not use ;begin_internal and end
  100. * each internal line with ;internal.
  101. *
  102. enddoc
  103. *
  104. ****************************************************************************/
  105. #ifndef _D3D_H_
  106. #define _D3D_H_
  107. #ifndef DIRECT3D_VERSION ;public_600
  108. #define DIRECT3D_VERSION 0x0300;public_dx3
  109. #define DIRECT3D_VERSION 0x0500;public_dx5
  110. #define DIRECT3D_VERSION 0x0600;public_dx6
  111. #define DIRECT3D_VERSION 0x0700;public_700
  112. #endif ;public_600
  113. // include this file content only if compiling for <=DX7 interfaces
  114. #if(DIRECT3D_VERSION < 0x0800)
  115. ;begin_internal
  116. #ifndef WIN32_LEAN_AND_MEAN
  117. #define WIN32_LEAN_AND_MEAN
  118. #endif
  119. ;end_internal
  120. #include <stdlib.h>
  121. #define COM_NO_WINDOWS_H
  122. #include <objbase.h>
  123. #define D3DAPI WINAPI
  124. /*
  125. * Interface IID's
  126. */
  127. #if defined( _WIN32 ) && !defined( _NO_COM)
  128. DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  129. DEFINE_GUID( IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a); ;if_(DIRECT3D_VERSION)_500
  130. DEFINE_GUID( IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e); ;if_(DIRECT3D_VERSION)_600
  131. DEFINE_GUID( IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8); ;if_(DIRECT3D_VERSION)_700
  132. ;begin_if_(DIRECT3D_VERSION)_500
  133. DEFINE_GUID( IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  134. DEFINE_GUID( IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  135. DEFINE_GUID( IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  136. DEFINE_GUID( IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  137. ;end_if_(DIRECT3D_VERSION)_500
  138. ;begin_if_(DIRECT3D_VERSION)_600
  139. DEFINE_GUID( IID_IDirect3DRefDevice, 0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  140. DEFINE_GUID( IID_IDirect3DNewRGBDevice, 0x15b29400, 0x2abf, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); ;internal
  141. DEFINE_GUID( IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  142. ;end_if_(DIRECT3D_VERSION)_600
  143. ;begin_if_(DIRECT3D_VERSION)_700
  144. DEFINE_GUID( IID_IDirect3DTnLHalDevice, 0xf5049e78, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  145. ;end_if_(DIRECT3D_VERSION)_700
  146. /*
  147. * Internal Guid to distinguish requested MMX from MMX being used as an RGB rasterizer
  148. */
  149. DEFINE_GUID( IID_IDirect3DMMXAsRGBDevice, 0xad72e0a0,0x0fb2,0x11d2,0xa4,0x5e,0x00,0xc0,0x4f,0xad,0x39,0xf4 ); ;internal
  150. DEFINE_GUID( IID_IDirect3DDevice, 0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  151. DEFINE_GUID( IID_IDirect3DDevice2, 0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); ;if_(DIRECT3D_VERSION)_500
  152. DEFINE_GUID( IID_IDirect3DDevice3, 0xb0ab3b60, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74); ;if_(DIRECT3D_VERSION)_600
  153. DEFINE_GUID( IID_IDirect3DDevice7, 0xf5049e79, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); ;if_(DIRECT3D_VERSION)_700
  154. DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  155. DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); ;if_(DIRECT3D_VERSION)_500
  156. DEFINE_GUID( IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  157. DEFINE_GUID( IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  158. DEFINE_GUID( IID_IDirect3DMaterial2, 0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); ;if_(DIRECT3D_VERSION)_500
  159. DEFINE_GUID( IID_IDirect3DMaterial3, 0xca9c46f4, 0xd3c5, 0x11d1, 0xb7, 0x5a, 0x0, 0x60, 0x8, 0x52, 0xb3, 0x12); ;if_(DIRECT3D_VERSION)_600
  160. DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  161. DEFINE_GUID( IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  162. DEFINE_GUID( IID_IDirect3DViewport2, 0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); ;if_(DIRECT3D_VERSION)_500
  163. DEFINE_GUID( IID_IDirect3DViewport3, 0xb0ab3b61, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);;if_(DIRECT3D_VERSION)_600
  164. DEFINE_GUID( IID_IDirect3DVertexBuffer, 0x7a503555, 0x4a83, 0x11d1, 0xa5, 0xdb, 0x0, 0xa0, 0xc9, 0x3, 0x67, 0xf8); ;if_(DIRECT3D_VERSION)_600
  165. DEFINE_GUID( IID_IDirect3DVertexBuffer7, 0xf5049e7d, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); ;if_(DIRECT3D_VERSION)_700
  166. #endif
  167. #ifdef __cplusplus
  168. struct IDirect3D;
  169. struct IDirect3DDevice;
  170. struct IDirect3DLight;
  171. struct IDirect3DMaterial;
  172. struct IDirect3DExecuteBuffer;
  173. struct IDirect3DTexture;
  174. struct IDirect3DViewport;
  175. typedef struct IDirect3D *LPDIRECT3D;
  176. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  177. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  178. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  179. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  180. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  181. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  182. ;begin_if_(DIRECT3D_VERSION)_500
  183. struct IDirect3D2;
  184. struct IDirect3DDevice2;
  185. struct IDirect3DMaterial2;
  186. struct IDirect3DTexture2;
  187. struct IDirect3DViewport2;
  188. typedef struct IDirect3D2 *LPDIRECT3D2;
  189. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  190. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  191. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  192. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  193. ;end_if_(DIRECT3D_VERSION)_500
  194. ;begin_if_(DIRECT3D_VERSION)_600
  195. struct IDirect3D3;
  196. struct IDirect3DDevice3;
  197. struct IDirect3DMaterial3;
  198. struct IDirect3DViewport3;
  199. struct IDirect3DVertexBuffer;
  200. typedef struct IDirect3D3 *LPDIRECT3D3;
  201. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  202. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  203. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  204. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  205. ;end_if_(DIRECT3D_VERSION)_600
  206. ;begin_if_(DIRECT3D_VERSION)_700
  207. struct IDirect3D7;
  208. struct IDirect3DDevice7;
  209. struct IDirect3DVertexBuffer7;
  210. typedef struct IDirect3D7 *LPDIRECT3D7;
  211. typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
  212. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  213. ;end_if_(DIRECT3D_VERSION)_700
  214. #else
  215. typedef struct IDirect3D *LPDIRECT3D;
  216. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  217. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  218. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  219. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  220. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  221. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  222. ;begin_if_(DIRECT3D_VERSION)_500
  223. typedef struct IDirect3D2 *LPDIRECT3D2;
  224. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  225. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  226. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  227. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  228. ;end_if_(DIRECT3D_VERSION)_500
  229. ;begin_if_(DIRECT3D_VERSION)_600
  230. typedef struct IDirect3D3 *LPDIRECT3D3;
  231. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  232. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  233. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  234. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  235. ;end_if_(DIRECT3D_VERSION)_600
  236. ;begin_if_(DIRECT3D_VERSION)_700
  237. typedef struct IDirect3D7 *LPDIRECT3D7;
  238. typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
  239. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  240. ;end_if_(DIRECT3D_VERSION)_700
  241. #endif
  242. ;begin_external
  243. #include "d3dtypes.h"
  244. #include "d3dcaps.h"
  245. ;end_external
  246. ;begin_internal
  247. #include "d3dtypesp.h"
  248. #include "d3dcapsp.h"
  249. ;end_internal
  250. #ifdef __cplusplus
  251. extern "C" {
  252. #endif
  253. /*
  254. * Direct3D interfaces
  255. */
  256. begin_interface(IDirect3D)
  257. begin_methods()
  258. declare_method(Initialize, REFCLSID);
  259. declare_method(EnumDevices, LPD3DENUMDEVICESCALLBACK, LPVOID);
  260. declare_method(CreateLight, LPDIRECT3DLIGHT*, IUnknown*);
  261. declare_method(CreateMaterial, LPDIRECT3DMATERIAL*, IUnknown*);
  262. declare_method(CreateViewport, LPDIRECT3DVIEWPORT*, IUnknown*);
  263. declare_method(FindDevice, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT);
  264. end_methods()
  265. end_interface()
  266. ;begin_if_(DIRECT3D_VERSION)_500
  267. begin_interface(IDirect3D2)
  268. begin_methods()
  269. declare_method(EnumDevices, LPD3DENUMDEVICESCALLBACK, LPVOID);
  270. declare_method(CreateLight, LPDIRECT3DLIGHT*, IUnknown*);
  271. declare_method(CreateMaterial, LPDIRECT3DMATERIAL2*, IUnknown*);
  272. declare_method(CreateViewport, LPDIRECT3DVIEWPORT2*, IUnknown*);
  273. declare_method(FindDevice, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT);
  274. declare_method(CreateDevice, REFCLSID, LPDIRECTDRAWSURFACE, LPDIRECT3DDEVICE2*);
  275. end_methods()
  276. end_interface()
  277. ;end_if_(DIRECT3D_VERSION)_500
  278. ;begin_if_(DIRECT3D_VERSION)_600
  279. begin_interface(IDirect3D3)
  280. begin_methods()
  281. declare_method(EnumDevices, LPD3DENUMDEVICESCALLBACK, LPVOID);
  282. declare_method(CreateLight, LPDIRECT3DLIGHT*, LPUNKNOWN);
  283. declare_method(CreateMaterial, LPDIRECT3DMATERIAL3*, LPUNKNOWN);
  284. declare_method(CreateViewport, LPDIRECT3DVIEWPORT3*, LPUNKNOWN);
  285. declare_method(FindDevice, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT);
  286. declare_method(CreateDevice, REFCLSID, LPDIRECTDRAWSURFACE4, LPDIRECT3DDEVICE3*, LPUNKNOWN);
  287. declare_method(CreateVertexBuffer, LPD3DVERTEXBUFFERDESC, LPDIRECT3DVERTEXBUFFER*, DWORD, LPUNKNOWN);
  288. declare_method(EnumZBufferFormats, REFCLSID, LPD3DENUMPIXELFORMATSCALLBACK, LPVOID);
  289. declare_method(EvictManagedTextures);
  290. end_methods()
  291. end_interface()
  292. ;end_if_(DIRECT3D_VERSION)_600
  293. ;begin_if_(DIRECT3D_VERSION)_700
  294. begin_interface(IDirect3D7)
  295. begin_methods()
  296. declare_method(EnumDevices, LPD3DENUMDEVICESCALLBACK7, LPVOID);
  297. declare_method(CreateDevice, REFCLSID, LPDIRECTDRAWSURFACE7, LPDIRECT3DDEVICE7*);
  298. declare_method(CreateVertexBuffer, LPD3DVERTEXBUFFERDESC, LPDIRECT3DVERTEXBUFFER7*, DWORD);
  299. declare_method(EnumZBufferFormats, REFCLSID, LPD3DENUMPIXELFORMATSCALLBACK, LPVOID);
  300. declare_method(EvictManagedTextures);
  301. end_methods()
  302. end_interface()
  303. ;end_if_(DIRECT3D_VERSION)_700
  304. /*
  305. * Direct3D Device interfaces
  306. */
  307. begin_interface(IDirect3DDevice)
  308. begin_methods()
  309. declare_method(Initialize, LPDIRECT3D, LPGUID, LPD3DDEVICEDESC);
  310. declare_method(GetCaps, LPD3DDEVICEDESC, LPD3DDEVICEDESC);
  311. declare_method(SwapTextureHandles, LPDIRECT3DTEXTURE, LPDIRECT3DTEXTURE);
  312. declare_method(CreateExecuteBuffer, LPD3DEXECUTEBUFFERDESC, LPDIRECT3DEXECUTEBUFFER*, IUnknown*);
  313. declare_method(GetStats, LPD3DSTATS);
  314. declare_method(Execute, LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD);
  315. declare_method(AddViewport, LPDIRECT3DVIEWPORT);
  316. declare_method(DeleteViewport, LPDIRECT3DVIEWPORT);
  317. declare_method(NextViewport, LPDIRECT3DVIEWPORT, LPDIRECT3DVIEWPORT*, DWORD);
  318. declare_method(Pick, LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD, LPD3DRECT);
  319. declare_method(GetPickRecords, LPDWORD, LPD3DPICKRECORD);
  320. declare_method(EnumTextureFormats, LPD3DENUMTEXTUREFORMATSCALLBACK, LPVOID);
  321. declare_method(CreateMatrix, LPD3DMATRIXHANDLE);
  322. declare_method(SetMatrix, D3DMATRIXHANDLE, const LPD3DMATRIX);
  323. declare_method(GetMatrix, D3DMATRIXHANDLE, LPD3DMATRIX);
  324. declare_method(DeleteMatrix, D3DMATRIXHANDLE);
  325. declare_method(BeginScene);
  326. declare_method(EndScene);
  327. declare_method(GetDirect3D, LPDIRECT3D*);
  328. end_methods()
  329. end_interface()
  330. ;begin_if_(DIRECT3D_VERSION)_500
  331. begin_interface(IDirect3DDevice2)
  332. begin_methods()
  333. declare_method(GetCaps, LPD3DDEVICEDESC, LPD3DDEVICEDESC);
  334. declare_method(SwapTextureHandles, LPDIRECT3DTEXTURE2, LPDIRECT3DTEXTURE2);
  335. declare_method(GetStats, LPD3DSTATS);
  336. declare_method(AddViewport, LPDIRECT3DVIEWPORT2);
  337. declare_method(DeleteViewport, LPDIRECT3DVIEWPORT2);
  338. declare_method(NextViewport, LPDIRECT3DVIEWPORT2, LPDIRECT3DVIEWPORT2*, DWORD);
  339. declare_method(EnumTextureFormats, LPD3DENUMTEXTUREFORMATSCALLBACK, LPVOID);
  340. declare_method(BeginScene);
  341. declare_method(EndScene);
  342. declare_method(GetDirect3D, LPDIRECT3D2*);
  343. declare_method(SetCurrentViewport, LPDIRECT3DVIEWPORT2);
  344. declare_method(GetCurrentViewport, LPDIRECT3DVIEWPORT2 *);
  345. declare_method(SetRenderTarget, LPDIRECTDRAWSURFACE, DWORD);
  346. declare_method(GetRenderTarget, LPDIRECTDRAWSURFACE *);
  347. declare_method(Begin, D3DPRIMITIVETYPE, D3DVERTEXTYPE, DWORD);
  348. declare_method(BeginIndexed, D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, DWORD);
  349. declare_method(Vertex, LPVOID);
  350. declare_method(Index, WORD);
  351. declare_method(End, DWORD);
  352. declare_method(GetRenderState, D3DRENDERSTATETYPE, LPDWORD);
  353. declare_method(SetRenderState, D3DRENDERSTATETYPE, DWORD);
  354. declare_method(GetLightState, D3DLIGHTSTATETYPE, LPDWORD);
  355. declare_method(SetLightState, D3DLIGHTSTATETYPE, DWORD);
  356. declare_method(SetTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  357. declare_method(GetTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  358. declare_method(MultiplyTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  359. declare_method(DrawPrimitive, D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, DWORD);
  360. declare_method(DrawIndexedPrimitive, D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, LPWORD, DWORD, DWORD);
  361. declare_method(SetClipStatus, LPD3DCLIPSTATUS);
  362. declare_method(GetClipStatus, LPD3DCLIPSTATUS);
  363. end_methods()
  364. end_interface()
  365. ;end_if_(DIRECT3D_VERSION)_500
  366. ;begin_if_(DIRECT3D_VERSION)_600
  367. begin_interface(IDirect3DDevice3)
  368. begin_methods()
  369. declare_method(GetCaps, LPD3DDEVICEDESC, LPD3DDEVICEDESC);
  370. declare_method(GetStats, LPD3DSTATS);
  371. declare_method(AddViewport, LPDIRECT3DVIEWPORT3);
  372. declare_method(DeleteViewport, LPDIRECT3DVIEWPORT3);
  373. declare_method(NextViewport, LPDIRECT3DVIEWPORT3, LPDIRECT3DVIEWPORT3*, DWORD);
  374. declare_method(EnumTextureFormats, LPD3DENUMPIXELFORMATSCALLBACK, LPVOID);
  375. declare_method(BeginScene);
  376. declare_method(EndScene);
  377. declare_method(GetDirect3D, LPDIRECT3D3*);
  378. declare_method(SetCurrentViewport, LPDIRECT3DVIEWPORT3);
  379. declare_method(GetCurrentViewport, LPDIRECT3DVIEWPORT3 *);
  380. declare_method(SetRenderTarget, LPDIRECTDRAWSURFACE4, DWORD);
  381. declare_method(GetRenderTarget, LPDIRECTDRAWSURFACE4 *);
  382. declare_method(Begin, D3DPRIMITIVETYPE, DWORD, DWORD);
  383. declare_method(BeginIndexed, D3DPRIMITIVETYPE, DWORD, LPVOID, DWORD, DWORD);
  384. declare_method(Vertex, LPVOID);
  385. declare_method(Index, WORD);
  386. declare_method(End, DWORD);
  387. declare_method(GetRenderState, D3DRENDERSTATETYPE, LPDWORD);
  388. declare_method(SetRenderState, D3DRENDERSTATETYPE, DWORD);
  389. declare_method(GetLightState, D3DLIGHTSTATETYPE, LPDWORD);
  390. declare_method(SetLightState, D3DLIGHTSTATETYPE, DWORD);
  391. declare_method(SetTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  392. declare_method(GetTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  393. declare_method(MultiplyTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  394. declare_method(DrawPrimitive, D3DPRIMITIVETYPE, DWORD, LPVOID, DWORD, DWORD);
  395. declare_method(DrawIndexedPrimitive, D3DPRIMITIVETYPE, DWORD, LPVOID, DWORD, LPWORD, DWORD, DWORD);
  396. declare_method(SetClipStatus, LPD3DCLIPSTATUS);
  397. declare_method(GetClipStatus, LPD3DCLIPSTATUS);
  398. declare_method(DrawPrimitiveStrided, D3DPRIMITIVETYPE, DWORD, LPD3DDRAWPRIMITIVESTRIDEDDATA, DWORD, DWORD);
  399. declare_method(DrawIndexedPrimitiveStrided, D3DPRIMITIVETYPE, DWORD, LPD3DDRAWPRIMITIVESTRIDEDDATA, DWORD, LPWORD, DWORD, DWORD);
  400. declare_method(DrawPrimitiveVB, D3DPRIMITIVETYPE, LPDIRECT3DVERTEXBUFFER, DWORD, DWORD, DWORD);
  401. declare_method(DrawIndexedPrimitiveVB, D3DPRIMITIVETYPE, LPDIRECT3DVERTEXBUFFER, LPWORD, DWORD, DWORD);
  402. declare_method(ComputeSphereVisibility, LPD3DVECTOR, LPD3DVALUE, DWORD, DWORD, LPDWORD);
  403. declare_method(GetTexture, DWORD, LPDIRECT3DTEXTURE2 *);
  404. declare_method(SetTexture, DWORD, LPDIRECT3DTEXTURE2);
  405. declare_method(GetTextureStageState, DWORD, D3DTEXTURESTAGESTATETYPE, LPDWORD);
  406. declare_method(SetTextureStageState, DWORD, D3DTEXTURESTAGESTATETYPE, DWORD);
  407. declare_method(ValidateDevice, LPDWORD);
  408. end_methods()
  409. end_interface()
  410. ;end_if_(DIRECT3D_VERSION)_600
  411. ;begin_if_(DIRECT3D_VERSION)_700
  412. begin_interface(IDirect3DDevice7)
  413. begin_methods()
  414. declare_method(GetCaps, LPD3DDEVICEDESC7);
  415. declare_method(EnumTextureFormats, LPD3DENUMPIXELFORMATSCALLBACK, LPVOID);
  416. declare_method(BeginScene);
  417. declare_method(EndScene);
  418. declare_method(GetDirect3D, LPDIRECT3D7*);
  419. declare_method(SetRenderTarget, LPDIRECTDRAWSURFACE7, DWORD);
  420. declare_method(GetRenderTarget, LPDIRECTDRAWSURFACE7 *);
  421. declare_method(Clear, DWORD, LPD3DRECT, DWORD, D3DCOLOR, D3DVALUE, DWORD);
  422. declare_method(SetTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  423. declare_method(GetTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  424. declare_method(SetViewport, LPD3DVIEWPORT7);
  425. declare_method(MultiplyTransform, D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  426. declare_method(GetViewport, LPD3DVIEWPORT7);
  427. declare_method(SetMaterial, LPD3DMATERIAL7);
  428. declare_method(GetMaterial, LPD3DMATERIAL7);
  429. declare_method(SetLight, DWORD, LPD3DLIGHT7);
  430. declare_method(GetLight, DWORD, LPD3DLIGHT7);
  431. declare_method(SetRenderState, D3DRENDERSTATETYPE, DWORD);
  432. declare_method(GetRenderState, D3DRENDERSTATETYPE, LPDWORD);
  433. declare_method(BeginStateBlock);
  434. declare_method(EndStateBlock, LPDWORD);
  435. declare_method(PreLoad, LPDIRECTDRAWSURFACE7);
  436. declare_method(DrawPrimitive, D3DPRIMITIVETYPE, DWORD, LPVOID, DWORD, DWORD);
  437. declare_method(DrawIndexedPrimitive, D3DPRIMITIVETYPE, DWORD, LPVOID, DWORD, LPWORD, DWORD, DWORD);
  438. declare_method(SetClipStatus, LPD3DCLIPSTATUS);
  439. declare_method(GetClipStatus, LPD3DCLIPSTATUS);
  440. declare_method(DrawPrimitiveStrided, D3DPRIMITIVETYPE, DWORD, LPD3DDRAWPRIMITIVESTRIDEDDATA, DWORD, DWORD);
  441. declare_method(DrawIndexedPrimitiveStrided, D3DPRIMITIVETYPE, DWORD, LPD3DDRAWPRIMITIVESTRIDEDDATA, DWORD, LPWORD, DWORD, DWORD);
  442. declare_method(DrawPrimitiveVB, D3DPRIMITIVETYPE, LPDIRECT3DVERTEXBUFFER7, DWORD, DWORD, DWORD);
  443. declare_method(DrawIndexedPrimitiveVB, D3DPRIMITIVETYPE, LPDIRECT3DVERTEXBUFFER7, DWORD, DWORD, LPWORD, DWORD, DWORD);
  444. declare_method(ComputeSphereVisibility, LPD3DVECTOR, LPD3DVALUE, DWORD, DWORD, LPDWORD);
  445. declare_method(GetTexture, DWORD, LPDIRECTDRAWSURFACE7 *);
  446. declare_method(SetTexture, DWORD, LPDIRECTDRAWSURFACE7);
  447. declare_method(GetTextureStageState, DWORD, D3DTEXTURESTAGESTATETYPE, LPDWORD);
  448. declare_method(SetTextureStageState, DWORD, D3DTEXTURESTAGESTATETYPE, DWORD);
  449. declare_method(ValidateDevice, LPDWORD);
  450. declare_method(ApplyStateBlock, DWORD);
  451. declare_method(CaptureStateBlock, DWORD);
  452. declare_method(DeleteStateBlock, DWORD);
  453. declare_method(CreateStateBlock, D3DSTATEBLOCKTYPE, LPDWORD);
  454. declare_method(Load, LPDIRECTDRAWSURFACE7, LPPOINT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD);
  455. declare_method(LightEnable, DWORD, BOOL);
  456. declare_method(GetLightEnable, DWORD, BOOL*);
  457. declare_method(SetClipPlane, DWORD, D3DVALUE*);
  458. declare_method(GetClipPlane, DWORD, D3DVALUE*);
  459. declare_method(GetInfo, DWORD, LPVOID, DWORD);
  460. end_methods()
  461. end_interface()
  462. ;end_if_(DIRECT3D_VERSION)_700
  463. /*
  464. * Execute Buffer interface
  465. */
  466. begin_interface(IDirect3DExecuteBuffer)
  467. begin_methods()
  468. declare_method(Initialize, LPDIRECT3DDEVICE, LPD3DEXECUTEBUFFERDESC);
  469. declare_method(Lock, LPD3DEXECUTEBUFFERDESC);
  470. declare_method(Unlock);
  471. declare_method(SetExecuteData, LPD3DEXECUTEDATA);
  472. declare_method(GetExecuteData, LPD3DEXECUTEDATA);
  473. declare_method(Validate, LPDWORD, LPD3DVALIDATECALLBACK, LPVOID, DWORD);
  474. declare_method(Optimize, DWORD);
  475. end_methods()
  476. end_interface()
  477. /*
  478. * Light interfaces
  479. */
  480. begin_interface(IDirect3DLight)
  481. begin_methods()
  482. declare_method(Initialize, LPDIRECT3D);
  483. declare_method(SetLight, LPD3DLIGHT);
  484. declare_method(GetLight, LPD3DLIGHT);
  485. end_methods()
  486. end_interface()
  487. /*
  488. * Material interfaces
  489. */
  490. begin_interface(IDirect3DMaterial)
  491. begin_methods()
  492. declare_method(Initialize, LPDIRECT3D);
  493. declare_method(SetMaterial, LPD3DMATERIAL);
  494. declare_method(GetMaterial, LPD3DMATERIAL);
  495. declare_method(GetHandle, LPDIRECT3DDEVICE, LPD3DMATERIALHANDLE);
  496. declare_method(Reserve);
  497. declare_method(Unreserve);
  498. end_methods()
  499. end_interface()
  500. ;begin_if_(DIRECT3D_VERSION)_500
  501. begin_interface(IDirect3DMaterial2)
  502. begin_methods()
  503. declare_method(SetMaterial, LPD3DMATERIAL);
  504. declare_method(GetMaterial, LPD3DMATERIAL);
  505. declare_method(GetHandle, LPDIRECT3DDEVICE2, LPD3DMATERIALHANDLE);
  506. end_methods()
  507. end_interface()
  508. ;end_if_(DIRECT3D_VERSION)_500
  509. ;begin_if_(DIRECT3D_VERSION)_600
  510. begin_interface(IDirect3DMaterial3)
  511. begin_methods()
  512. declare_method(SetMaterial, LPD3DMATERIAL);
  513. declare_method(GetMaterial, LPD3DMATERIAL);
  514. declare_method(GetHandle, LPDIRECT3DDEVICE3, LPD3DMATERIALHANDLE);
  515. end_methods()
  516. end_interface()
  517. ;end_if_(DIRECT3D_VERSION)_600
  518. /*
  519. * Texture interfaces
  520. */
  521. begin_interface(IDirect3DTexture)
  522. begin_methods()
  523. declare_method(Initialize, LPDIRECT3DDEVICE, LPDIRECTDRAWSURFACE);
  524. declare_method(GetHandle, LPDIRECT3DDEVICE, LPD3DTEXTUREHANDLE);
  525. declare_method(PaletteChanged, DWORD, DWORD);
  526. declare_method(Load, LPDIRECT3DTEXTURE);
  527. declare_method(Unload);
  528. end_methods()
  529. end_interface()
  530. ;begin_if_(DIRECT3D_VERSION)_500
  531. begin_interface(IDirect3DTexture2)
  532. begin_methods()
  533. declare_method(GetHandle, LPDIRECT3DDEVICE2, LPD3DTEXTUREHANDLE);
  534. declare_method(PaletteChanged, DWORD, DWORD);
  535. declare_method(Load, LPDIRECT3DTEXTURE2);
  536. end_methods()
  537. end_interface()
  538. ;end_if_(DIRECT3D_VERSION)_500
  539. /*
  540. * Viewport interfaces
  541. */
  542. begin_interface(IDirect3DViewport)
  543. begin_methods()
  544. declare_method(Initialize, LPDIRECT3D);
  545. declare_method(GetViewport, LPD3DVIEWPORT);
  546. declare_method(SetViewport, LPD3DVIEWPORT);
  547. declare_method(TransformVertices, DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD);
  548. declare_method(LightElements, DWORD, LPD3DLIGHTDATA);
  549. declare_method(SetBackground, D3DMATERIALHANDLE);
  550. declare_method(GetBackground, LPD3DMATERIALHANDLE, LPBOOL);
  551. declare_method(SetBackgroundDepth, LPDIRECTDRAWSURFACE);
  552. declare_method(GetBackgroundDepth, LPDIRECTDRAWSURFACE*, LPBOOL);
  553. declare_method(Clear, DWORD, LPD3DRECT, DWORD);
  554. declare_method(AddLight, LPDIRECT3DLIGHT);
  555. declare_method(DeleteLight, LPDIRECT3DLIGHT);
  556. declare_method(NextLight, LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD);
  557. end_methods()
  558. end_interface()
  559. ;begin_if_(DIRECT3D_VERSION)_500
  560. begin_interface(IDirect3DViewport2, IDirect3DViewport)
  561. begin_methods()
  562. declare_method(Initialize, LPDIRECT3D);
  563. declare_method(GetViewport, LPD3DVIEWPORT);
  564. declare_method(SetViewport, LPD3DVIEWPORT);
  565. declare_method(TransformVertices, DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD);
  566. declare_method(LightElements, DWORD, LPD3DLIGHTDATA);
  567. declare_method(SetBackground, D3DMATERIALHANDLE);
  568. declare_method(GetBackground, LPD3DMATERIALHANDLE, LPBOOL);
  569. declare_method(SetBackgroundDepth, LPDIRECTDRAWSURFACE);
  570. declare_method(GetBackgroundDepth, LPDIRECTDRAWSURFACE*, LPBOOL);
  571. declare_method(Clear, DWORD, LPD3DRECT, DWORD);
  572. declare_method(AddLight, LPDIRECT3DLIGHT);
  573. declare_method(DeleteLight, LPDIRECT3DLIGHT);
  574. declare_method(NextLight, LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD);
  575. declare_method(GetViewport2, LPD3DVIEWPORT2);
  576. declare_method(SetViewport2, LPD3DVIEWPORT2);
  577. end_methods()
  578. end_interface()
  579. ;end_if_(DIRECT3D_VERSION)_500
  580. ;begin_if_(DIRECT3D_VERSION)_600
  581. begin_interface(IDirect3DViewport3, IDirect3DViewport2)
  582. begin_methods()
  583. declare_method(Initialize, LPDIRECT3D);
  584. declare_method(GetViewport, LPD3DVIEWPORT);
  585. declare_method(SetViewport, LPD3DVIEWPORT);
  586. declare_method(TransformVertices, DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD);
  587. declare_method(LightElements, DWORD, LPD3DLIGHTDATA);
  588. declare_method(SetBackground, D3DMATERIALHANDLE);
  589. declare_method(GetBackground, LPD3DMATERIALHANDLE, LPBOOL);
  590. declare_method(SetBackgroundDepth, LPDIRECTDRAWSURFACE);
  591. declare_method(GetBackgroundDepth, LPDIRECTDRAWSURFACE*, LPBOOL);
  592. declare_method(Clear, DWORD, LPD3DRECT, DWORD);
  593. declare_method(AddLight, LPDIRECT3DLIGHT);
  594. declare_method(DeleteLight, LPDIRECT3DLIGHT);
  595. declare_method(NextLight, LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD);
  596. declare_method(GetViewport2, LPD3DVIEWPORT2);
  597. declare_method(SetViewport2, LPD3DVIEWPORT2);
  598. declare_method(SetBackgroundDepth2, LPDIRECTDRAWSURFACE4);
  599. declare_method(GetBackgroundDepth2, LPDIRECTDRAWSURFACE4*, LPBOOL);
  600. declare_method(Clear2, DWORD, LPD3DRECT, DWORD, D3DCOLOR, D3DVALUE, DWORD);
  601. end_methods()
  602. end_interface()
  603. ;end_if_(DIRECT3D_VERSION)_600
  604. ;begin_if_(DIRECT3D_VERSION)_600
  605. begin_interface(IDirect3DVertexBuffer)
  606. begin_methods()
  607. declare_method(Lock, DWORD, LPVOID*, LPDWORD);
  608. declare_method(Unlock);
  609. declare_method(ProcessVertices, DWORD, DWORD, DWORD, LPDIRECT3DVERTEXBUFFER, DWORD, LPDIRECT3DDEVICE3, DWORD);
  610. declare_method(GetVertexBufferDesc, LPD3DVERTEXBUFFERDESC);
  611. declare_method(Optimize, LPDIRECT3DDEVICE3, DWORD);
  612. end_methods()
  613. end_interface()
  614. ;end_if_(DIRECT3D_VERSION)_600
  615. ;begin_if_(DIRECT3D_VERSION)_700
  616. begin_interface(IDirect3DVertexBuffer7)
  617. begin_methods()
  618. declare_method(Lock, DWORD, LPVOID*, LPDWORD);
  619. declare_method(Unlock);
  620. declare_method(ProcessVertices, DWORD, DWORD, DWORD, LPDIRECT3DVERTEXBUFFER7, DWORD, LPDIRECT3DDEVICE7, DWORD);
  621. declare_method(GetVertexBufferDesc, LPD3DVERTEXBUFFERDESC);
  622. declare_method(Optimize, LPDIRECT3DDEVICE7, DWORD);
  623. declare_method(ProcessVerticesStrided, DWORD, DWORD, DWORD, LPD3DDRAWPRIMITIVESTRIDEDDATA, DWORD, LPDIRECT3DDEVICE7, DWORD);
  624. end_methods()
  625. end_interface()
  626. ;end_if_(DIRECT3D_VERSION)_700
  627. ;begin_if_(DIRECT3D_VERSION)_500
  628. /****************************************************************************
  629. *
  630. * Flags for IDirect3DDevice::NextViewport
  631. *
  632. ****************************************************************************/
  633. /*
  634. * Return the next viewport
  635. */
  636. #define D3DNEXT_NEXT 0x00000001l
  637. /*
  638. * Return the first viewport
  639. */
  640. #define D3DNEXT_HEAD 0x00000002l
  641. /*
  642. * Return the last viewport
  643. */
  644. #define D3DNEXT_TAIL 0x00000004l
  645. /****************************************************************************
  646. *
  647. * Flags for DrawPrimitive/DrawIndexedPrimitive
  648. * Also valid for Begin/BeginIndexed
  649. ;begin_public_600
  650. * Also valid for VertexBuffer::CreateVertexBuffer
  651. ;end_public_600
  652. * ;internal
  653. * Only 8 low bits are available for these flags. Remember this when ;internal
  654. * adding new flags. ;internal
  655. * ;internal
  656. ****************************************************************************/
  657. /*
  658. * Wait until the device is ready to draw the primitive
  659. * This will cause DP to not return DDERR_WASSTILLDRAWING
  660. */
  661. #define D3DDP_WAIT 0x00000001l
  662. ;end_if_(DIRECT3D_VERSION)_500
  663. #if (DIRECT3D_VERSION == 0x0500)
  664. ;begin_public_500
  665. /*
  666. * Hint that it is acceptable to render the primitive out of order.
  667. */
  668. #define D3DDP_OUTOFORDER 0x00000002l
  669. ;end_public_500
  670. #endif
  671. // Turning this flag off for DX5 since we do not take advantage of it ;internal
  672. // This used to be D3DDP_OUTOFORDER in DX5 ;internal
  673. #define D3DDP_RESERVED 0x00000002l ;internal
  674. ;begin_if_(DIRECT3D_VERSION)_500
  675. /*
  676. * Hint that the primitives have been clipped by the application.
  677. */
  678. #define D3DDP_DONOTCLIP 0x00000004l
  679. /*
  680. * Hint that the extents need not be updated.
  681. */
  682. #define D3DDP_DONOTUPDATEEXTENTS 0x00000008l
  683. ;end_if_(DIRECT3D_VERSION)_500
  684. ;begin_if_(DIRECT3D_VERSION)_600
  685. /*
  686. * Hint that the lighting should not be applied on vertices.
  687. */
  688. #define D3DDP_DONOTLIGHT 0x00000010l
  689. ;end_if_(DIRECT3D_VERSION)_600
  690. /*
  691. * Direct3D Errors
  692. * DirectDraw error codes are used when errors not specified here.
  693. */
  694. #define D3D_OK DD_OK
  695. #define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
  696. #define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
  697. ;begin_if_(DIRECT3D_VERSION)_500
  698. /*
  699. * An invalid device was requested by the application.
  700. */
  701. #define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
  702. #define D3DERR_INITFAILED MAKE_DDHRESULT(706)
  703. /*
  704. * SetRenderTarget attempted on a device that was
  705. * QI'd off the render target.
  706. */
  707. #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
  708. ;end_if_(DIRECT3D_VERSION)_500
  709. #define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
  710. #define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
  711. #define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
  712. #define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
  713. #define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
  714. #define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
  715. #define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
  716. #define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
  717. #define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
  718. #define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
  719. #define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
  720. #define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
  721. #define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
  722. #define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
  723. #define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
  724. #define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
  725. #define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
  726. #define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
  727. #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
  728. #define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
  729. #define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
  730. #define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
  731. #define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
  732. ;begin_if_(DIRECT3D_VERSION)_500
  733. #define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
  734. #define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
  735. #define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
  736. #define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
  737. #define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
  738. ;end_if_(DIRECT3D_VERSION)_500
  739. #define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
  740. #define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
  741. #define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
  742. #define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
  743. ;begin_if_(DIRECT3D_VERSION)_500
  744. #define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
  745. #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
  746. #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
  747. #define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
  748. ;end_if_(DIRECT3D_VERSION)_500
  749. #define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
  750. ;begin_if_(DIRECT3D_VERSION)_500
  751. #define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
  752. #define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
  753. ;end_if_(DIRECT3D_VERSION)_500
  754. #define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
  755. #define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
  756. #define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
  757. #define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
  758. ;begin_if_(DIRECT3D_VERSION)_500
  759. #define D3DERR_INBEGIN MAKE_DDHRESULT(770)
  760. #define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
  761. #define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
  762. #define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
  763. #define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
  764. #define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
  765. ;end_if_(DIRECT3D_VERSION)_500
  766. // Error codes added in DX6 and later should be in range 2048-3071 ;internal
  767. // until further notice. ;internal
  768. ;internal
  769. ;begin_if_(DIRECT3D_VERSION)_600
  770. #define D3DERR_INVALIDVERTEXFORMAT MAKE_DDHRESULT(2048)
  771. /*
  772. * Attempted to CreateTexture on a surface that had a color key
  773. */
  774. #define D3DERR_COLORKEYATTACHED MAKE_DDHRESULT(2050)
  775. #define D3DERR_VERTEXBUFFEROPTIMIZED MAKE_DDHRESULT(2060)
  776. #define D3DERR_VBUF_CREATE_FAILED MAKE_DDHRESULT(2061)
  777. #define D3DERR_VERTEXBUFFERLOCKED MAKE_DDHRESULT(2062)
  778. #define D3DERR_VERTEXBUFFERUNLOCKFAILED MAKE_DDHRESULT(2063)
  779. #define D3DERR_ZBUFFER_NOTPRESENT MAKE_DDHRESULT(2070)
  780. #define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071)
  781. #define D3DERR_WRONGTEXTUREFORMAT MAKE_DDHRESULT(2072)
  782. #define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_DDHRESULT(2073)
  783. #define D3DERR_UNSUPPORTEDCOLORARG MAKE_DDHRESULT(2074)
  784. #define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_DDHRESULT(2075)
  785. #define D3DERR_UNSUPPORTEDALPHAARG MAKE_DDHRESULT(2076)
  786. #define D3DERR_TOOMANYOPERATIONS MAKE_DDHRESULT(2077)
  787. #define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_DDHRESULT(2078)
  788. #define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_DDHRESULT(2079)
  789. #define D3DERR_CONFLICTINGRENDERSTATE MAKE_DDHRESULT(2081)
  790. #define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_DDHRESULT(2082)
  791. #define D3DERR_TOOMANYPRIMITIVES MAKE_DDHRESULT(2083)
  792. #define D3DERR_INVALIDMATRIX MAKE_DDHRESULT(2084)
  793. #define D3DERR_TOOMANYVERTICES MAKE_DDHRESULT(2085)
  794. #define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_DDHRESULT(2086)
  795. ;end_if_(DIRECT3D_VERSION)_600
  796. ;begin_if_(DIRECT3D_VERSION)_700
  797. #define D3DERR_INVALIDSTATEBLOCK MAKE_DDHRESULT(2100)
  798. #define D3DERR_INBEGINSTATEBLOCK MAKE_DDHRESULT(2101)
  799. #define D3DERR_NOTINBEGINSTATEBLOCK MAKE_DDHRESULT(2102)
  800. ;end_if_(DIRECT3D_VERSION)_700
  801. ;begin_internal
  802. // Error code 3000 reserved for DDI. Do not allocate for any API
  803. // visible error
  804. // #define D3DERR_COMMAND_UNPARSED MAKE_DDHRESULT(3000)
  805. ;end_internal
  806. #ifdef __cplusplus
  807. };
  808. #endif
  809. #endif /* (DIRECT3D_VERSION < 0x0800) */
  810. #endif /* _D3D_H_ */