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.

2471 lines
97 KiB

  1. #ifdef VB_ONLY
  2. #ifdef VB_ONLY
  3. #define D3DDEVICEINFO_TEXTURING_CDESC D3DDEVICEINFO_TEXTURING
  4. #define D3DDEVICEINFO_TEXTURE_MANAGER_CDESC D3DDEVICEINFO_TEXTURE_MANAGER
  5. #define D3DCAPS8_CDESC D3DCAPS8
  6. #define D3DPRIMCAPS8_CDESC D3DPRIMCAPS8
  7. #define D3DLINEPATTERN_CDESC D3DLINEPATTERN
  8. #define D3DRASTER_STATUS_CDESC D3DRASTER_STATUS
  9. #define D3DADAPTER_IDENTIFIER8_CDESC D3DADAPTER_IDENTIFIER8
  10. #define D3DRANGE_CDESC D3DRANGE
  11. #define D3DLOCKED_BOX_CDESC D3DLOCKED_BOX
  12. #define D3DBOX_CDESC D3DBOX
  13. #define D3DLOCKED_RECT_CDESC D3DLOCKED_RECT
  14. #define D3DVOLUME_DESC_CDESC D3DVOLUME_DESC
  15. #define D3DSURFACE_DESC_CDESC D3DSURFACE_DESC
  16. #define D3DINDEXBUFFER_DESC_CDESC D3DINDEXBUFFER_DESC
  17. #define D3DVERTEXBUFFER_DESC_CDESC D3DVERTEXBUFFER_DESC
  18. #define D3DLIGHT8_CDESC D3DLIGHT8
  19. #define D3DGAMMARAMP_CDESC D3DGAMMARAMP
  20. #define D3DPRESENT_PARAMETERS_CDESC D3DPRESENT_PARAMETERS
  21. #define D3DDISPLAYMODE_CDESC D3DDISPLAYMODE
  22. #define D3DVERTEX_CDESC D3DVERTEX
  23. #define D3DLVERTEX_CDESC D3DLVERTEX
  24. #define D3DTLVERTEX_CDESC D3DTLVERTEX
  25. #define D3DHVERTEX_CDESC D3DHVERTEX
  26. #define D3DRECT_CDESC D3DRECT
  27. #define D3DPOINT_CDESC D3DPOINT
  28. #define D3DRASTER_STATUS_CDESC D3DRASTER_STATUS
  29. #define D3DCLIPSTATUS8_CDESC D3DCLIPSTATUS8
  30. //#define D3DCOLORVALUE_CDESC D3DCOLORVALUE
  31. #define D3DVERTEX2_CDESC D3DVERTEX2
  32. #define D3DTLVERTEX2_CDESC D3DTLVERTEX2
  33. #define D3DLVERTEX2_CDESC D3DLVERTEX2
  34. #define D3DTRIPATCH_INFO_CDESC D3DTRIPATCH_INFO
  35. #define D3DRECTPATCH_INFO_CDESC D3DRECTPATCH_INFO
  36. //#define D3DCLIPPLANE_CDESC D3DCLIPPLANE
  37. #endif
  38. #ifdef C_ONLY
  39. //DEFINED in COMMON.IDL
  40. //DXGUID
  41. //RECT
  42. //D3DVECTOR
  43. #define CONST_D3DLIGHTTYPE LONG
  44. #define CONST_D3DSHADEMODE LONG
  45. #define CONST_D3DFILLMODE LONG
  46. #define CONST_D3DBLEND LONG
  47. #define CONST_D3DTEXTUREADDRESS LONG
  48. #define CONST_D3DCULL LONG
  49. #define CONST_D3DCMPFUNC LONG
  50. #define CONST_D3DSTENCILOP LONG
  51. #define CONST_D3DFOGMODE LONG
  52. #define CONST_D3DZBUFFERTYPE LONG
  53. #define CONST_D3DPRIMITIVETYPE LONG
  54. #define CONST_D3DTRANSFORMSTATETYPE LONG
  55. #define CONST_D3DRENDERSTATETYPE LONG
  56. #define CONST_D3DMATERIALCOLORSOURCE LONG
  57. #define CONST_D3DTEXTURESTAGESTATETYPE LONG
  58. #define CONST_D3DTEXTUREOP LONG
  59. #define CONST_D3DTEXTUREMAGFILTER LONG
  60. #define CONST_D3DTEXTUREMINFILTER LONG
  61. #define CONST_D3DTEXTUREMIPFILTER LONG
  62. #define CONST_D3DDEVICETYPE LONG
  63. #define CONST_D3DTYPE LONG
  64. #define CONST_D3DMULTISAMPLETYPE LONG
  65. #define CONST_D3DSWAPEFFECT LONG
  66. #define CONST_D3DPOOL LONG
  67. #define CONST_D3DFORMAT LONG
  68. #define CONST_D3DRESOURCETYPE LONG
  69. #endif
  70. #ifdef VB_ONLY
  71. #define IDirect3D8 Direct3D8
  72. #define IDirect3DDevice8 Direct3DDevice8
  73. #define IDirect3DResource8 Direct3DResource8
  74. #define IDirect3DSwapChain8 Direct3DSwapChain8
  75. #define IDirect3DBaseTexture8 Direct3DBaseTexture8
  76. #define IDirect3DTexture8 Direct3DTexture8
  77. #define IDirect3DVolumeTexture8 Direct3DVolumeTexture8
  78. #define IDirect3DCubeTexture8 Direct3DCubeTexture8
  79. #define IDirect3DVertexBuffer8 Direct3DVertexBuffer8
  80. #define IDirect3DIndexBuffer8 Direct3DIndexBuffer8
  81. #define IDirect3DSurface8 Direct3DSurface8
  82. #define IDirect3DVolume8 Direct3DVolume8
  83. #endif
  84. #undef DWORD
  85. #undef LPDWORD
  86. #undef BOOL
  87. #undef LPBOOL
  88. #undef UINT
  89. #define WORD SHORT
  90. #define DWORD LONG
  91. #define LPDWORD LONG*
  92. #define BOOL LONG
  93. #define LPBOOL LONG*
  94. #define UINT INT
  95. #define HWND LONG
  96. #define HANDLE LONG
  97. #define HDC LONG
  98. #define BYTE BYTE
  99. #define LPUINT INT*
  100. #define VOID void
  101. #define WINAPI _stdcall
  102. #define REFGUID DXGUID_CDESC*
  103. #define GUID DXGUID_CDESC
  104. #define LPVOID void*
  105. #define LPRECT RECT_CDESC*
  106. #define HMONITOR LONG
  107. #define THIS
  108. #define THIS_
  109. #define D3DCOLOR LONG
  110. #define D3DMATERIALHANDLE LONG
  111. #define D3DTEXTUREHANDLE LONG
  112. #define D3DMATRIXHANDLE LONG
  113. #define D3DCOLORMODEL LONG
  114. #define D3DVALUE FLOAT
  115. #define LPDIRECT3D8 IDirect3D8 *
  116. #define LPDIRECTDRAWPALETTE LONG *
  117. #define LPDIRECT3DDEVICE8 IDirect3DDevice8*
  118. #define LPDIRECT3DSURFACE8 IDirect3DSurface8 *
  119. #define LPDIRECT3DBASETEXTURE8 IDirect3DBaseTexture8 *
  120. #define LPD3DVERTEXBUFFER8 IDirect3DVertexBuffer8 *
  121. #define LPD3DINDEXBUFFER8 IDirect3DIndexBuffer8 *
  122. #define LPDIRECT3DVERTEXBUFFER8 IDirect3DVertexBuffer8 *
  123. #define LPDIRECT3DINDEXBUFFER8 IDirect3DIndexBuffer8 *
  124. #define LPDIRECT3DVOLUME8 IDirect3DVolume8 *
  125. #define LPDIRECT3DTEXTURE8 IDirect3DTexture8 *
  126. #define LPDIRECT3DCUBETEXTURE8 IDirect3DCubeTexture8 *
  127. #define LPD3DRECT D3DRECT_CDESC *
  128. #define LPD3DMATRIX D3DMATRIX_CDESC *
  129. #define LPD3DVIEWPORT8 D3DVIEWPORT8_CDESC *
  130. #define LPD3DMATERIAL8 D3DMATERIAL8_CDESC *
  131. #define LPD3DLIGHT8 D3DLIGHT8_CDESC *
  132. #define LPD3DVECTOR D3DVECTOR_CDESC *
  133. #define LPD3D_BOX D3D_BOX_CDESC *
  134. #define LPD3DVALUE FLOAT *
  135. //BUGBUG
  136. #define LPD3DCLIPSTATUS8 D3DCLIPSTATUS8_CDESC *
  137. /************************************* Interface List **********************************************/
  138. interface IDirect3D8;
  139. interface IDirect3DDevice8;
  140. interface IDirect3DBaseTexture8;
  141. interface IDirect3DTexture8;
  142. interface IDirect3DVolumeTexture8;
  143. interface IDirect3DCubeTexture8;
  144. interface ID3DVertexBuffer8;
  145. interface ID3DIndexBuffer8;
  146. interface IDirect3DSurface8;
  147. interface IDirect3DVolume8;
  148. interface IDirect3DVertexBuffer8;
  149. interface IDirect3DIndexBuffer8;
  150. interface IDirect3DSwapChain8;
  151. interface IDirect3DResource8;
  152. interface IDirect3DSwapChain8;
  153. #ifdef VB_ONLY
  154. /******************************************* ENUMS **********************************************/
  155. //From D3D8Caps.h
  156. [helpcontext(83272)]
  157. typedef enum CONST_D3DPMISCCAPSFLAGS
  158. {
  159. D3DPMISCCAPS_MASKZ =0x00000002,
  160. D3DPMISCCAPS_LINEPATTERNREP =0x00000004,
  161. D3DPMISCCAPS_CULLNONE =0x00000010,
  162. D3DPMISCCAPS_CULLCW =0x00000020,
  163. D3DPMISCCAPS_CULLCCW =0x00000040,
  164. D3DPMISCCAPS_COLORWRITEENABLE =0x00000080,
  165. D3DPMISCCAPS_CLIPPLANESCALEDPOINTS =0x00000100, /* Device correctly clips scaled points to clip planes */
  166. D3DPMISCCAPS_CLIPTLVERTS =0x00000200, /* device will clip post-transformed vertex primitives */
  167. D3DPMISCCAPS_TSSARGTEMP =0x00000400, /* device supports D3DTA_TEMP for temporary register */
  168. D3DPMISCCAPS_BLENDOP =0x00000800, /* device supports D3DRS_BLENDOP */
  169. } CONST_D3DPMISCCAPSFLAGS;
  170. [helpcontext(83264)]
  171. typedef enum CONST_D3DLINECAPS
  172. {
  173. D3DLINECAPS_TEXTURE =0x00000001,
  174. D3DLINECAPS_ZTEST =0x00000002,
  175. D3DLINECAPS_BLEND =0x00000004,
  176. D3DLINECAPS_ALPHACMP =0x00000008,
  177. D3DLINECAPS_FOG =0x00000010,
  178. } CONST_D3DLINECAPS;
  179. /* D3DPRIMCAPS dwRasterCaps */
  180. [helpcontext(83274)]
  181. typedef enum CONST_D3DPRASTERCAPSFLAGS
  182. {
  183. D3DPRASTERCAPS_DITHER =0x00000001,
  184. D3DPRASTERCAPS_ROP2 =0x00000002,
  185. D3DPRASTERCAPS_XOR =0x00000004,
  186. D3DPRASTERCAPS_PAT =0x00000008,
  187. D3DPRASTERCAPS_ZTEST =0x00000010,
  188. D3DPRASTERCAPS_FOGVERTEX =0x00000080,
  189. D3DPRASTERCAPS_FOGTABLE =0x00000100,
  190. D3DPRASTERCAPS_ANTIALIASEDGES =0x00001000,
  191. D3DPRASTERCAPS_MIPMAPLODBIAS =0x00002000,
  192. D3DPRASTERCAPS_ZBIAS =0x00004000,
  193. D3DPRASTERCAPS_ZBUFFERLESSHSR =0x00008000,
  194. D3DPRASTERCAPS_FOGRANGE =0x00010000,
  195. D3DPRASTERCAPS_ANISOTROPY =0x00020000,
  196. D3DPRASTERCAPS_WBUFFER =0x00040000,
  197. D3DPRASTERCAPS_WFOG =0x00100000,
  198. D3DPRASTERCAPS_ZFOG =0x00200000,
  199. D3DPRASTERCAPS_COLORPERSPECTIVE =0x00400000, /* Device iterates colors perspective correct */
  200. D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE =0x00800000,
  201. } CONST_D3DPRASTERCAPSFLAGS ;
  202. /* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
  203. [helpcontext(83271)]
  204. typedef enum CONST_D3DPCMPCAPSFLAGS {
  205. D3DPCMPCAPS_NEVER = 0x00000001,
  206. D3DPCMPCAPS_LESS = 0x00000002,
  207. D3DPCMPCAPS_EQUAL = 0x00000004,
  208. D3DPCMPCAPS_LESSEQUAL = 0x00000008,
  209. D3DPCMPCAPS_GREATER = 0x00000010,
  210. D3DPCMPCAPS_NOTEQUAL = 0x00000020,
  211. D3DPCMPCAPS_GREATEREQUAL = 0x00000040,
  212. D3DPCMPCAPS_ALWAYS = 0x00000080,
  213. } CONST_D3DPCMPCAPSFLAGS;
  214. /* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
  215. [helpcontext(83269)]
  216. typedef enum CONST_D3DPBLENDCAPSFLAGS {
  217. D3DPBLENDCAPS_ZERO = 0x00000001,
  218. D3DPBLENDCAPS_ONE = 0x00000002,
  219. D3DPBLENDCAPS_SRCCOLOR = 0x00000004,
  220. D3DPBLENDCAPS_INVSRCCOLOR = 0x00000008,
  221. D3DPBLENDCAPS_SRCALPHA = 0x00000010,
  222. D3DPBLENDCAPS_INVSRCALPHA = 0x00000020,
  223. D3DPBLENDCAPS_DESTALPHA = 0x00000040,
  224. D3DPBLENDCAPS_INVDESTALPHA = 0x00000080,
  225. D3DPBLENDCAPS_DESTCOLOR = 0x00000100,
  226. D3DPBLENDCAPS_INVDESTCOLOR = 0x00000200,
  227. D3DPBLENDCAPS_SRCALPHASAT = 0x00000400,
  228. D3DPBLENDCAPS_BOTHSRCALPHA = 0x00000800,
  229. D3DPBLENDCAPS_BOTHINVSRCALPHA = 0x00001000,
  230. } CONST_D3DPBLENDCAPSFLAGS;
  231. /* D3DPRIMCAPS dwShadeCaps */
  232. [helpcontext(83278)]
  233. typedef enum CONST_D3DPSHADECAPSFLAGS {
  234. D3DPSHADECAPS_COLORGOURAUDRGB = 0x00000008,
  235. D3DPSHADECAPS_SPECULARGOURAUDRGB = 0x00000200,
  236. D3DPSHADECAPS_ALPHAGOURAUDBLEND = 0x00004000,
  237. D3DPSHADECAPS_FOGGOURAUD = 0x00080000,
  238. } CONST_D3DPSHADECAPSFLAGS;
  239. /* D3DPRIMCAPS dwTextureCaps */
  240. [helpcontext(83280)]
  241. typedef enum CONST_D3DPTEXTURECAPSFLAGS {
  242. D3DPTEXTURECAPS_PERSPECTIVE =0x00000001, /* Perspective-correct texturing is supported */
  243. D3DPTEXTURECAPS_POW2 =0x00000002, /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */
  244. D3DPTEXTURECAPS_ALPHA =0x00000004, /* Alpha in texture pixels is supported */
  245. D3DPTEXTURECAPS_SQUAREONLY =0x00000020, /* Only square textures are supported */
  246. D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE =0x00000040, /* Texture indices are not scaled by the texture size prior to interpolation */
  247. D3DPTEXTURECAPS_ALPHAPALETTE =0x00000080, /* Device can draw alpha from texture palettes */
  248. // Device can use non-POW2 textures if:
  249. // 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
  250. // 2) D3DRS_WRAP(N) is zero for this texture's coordinates
  251. // 3) mip mapping is not enabled (use magnification filter only)
  252. D3DPTEXTURECAPS_NONPOW2CONDITIONAL =0x00000100,
  253. D3DPTEXTURECAPS_PROJECTED =0x00000400, /* Device can do D3DTTFF_PROJECTED */
  254. D3DPTEXTURECAPS_CUBEMAP =0x00000800, /* Device can do cubemap textures */
  255. D3DPTEXTURECAPS_VOLUMEMAP =0x00002000, /* Device can do volume textures */
  256. D3DPTEXTURECAPS_MIPMAP =0x00004000, /* Device can do mipmapped textures */
  257. D3DPTEXTURECAPS_MIPVOLUMEMAP =0x00008000, /* Device can do mipmapped volume textures */
  258. D3DPTEXTURECAPS_MIPCUBEMAP =0x00010000, /* Device can do mipmapped cube maps */
  259. D3DPTEXTURECAPS_CUBEMAP_POW2 =0x00020000, /* Device requires that cubemaps be power-of-2 dimension */
  260. D3DPTEXTURECAPS_VOLUMEMAP_POW2 =0x00040000, /* Device requires that volume maps be power-of-2 dimension */
  261. } CONST_D3DPTEXTURECAPSFLAGS;
  262. /* D3DPRIMCAPS dwTextureFilterCaps */
  263. [helpcontext(83281)]
  264. typedef enum CONST_D3DPTFILTERCAPSFLAGS {
  265. D3DPTFILTERCAPS_MINFPOINT =0x00000100, /* Min Filter */
  266. D3DPTFILTERCAPS_MINFLINEAR =0x00000200,
  267. D3DPTFILTERCAPS_MINFANISOTROPIC =0x00000400,
  268. D3DPTFILTERCAPS_MIPFPOINT =0x00010000, /* Mip Filter */
  269. D3DPTFILTERCAPS_MIPFLINEAR =0x00020000,
  270. D3DPTFILTERCAPS_MAGFPOINT =0x01000000, /* Mag Filter */
  271. D3DPTFILTERCAPS_MAGFLINEAR =0x02000000,
  272. D3DPTFILTERCAPS_MAGFANISOTROPIC =0x04000000,
  273. D3DPTFILTERCAPS_MAGFAFLATCUBIC =0x08000000,
  274. D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC =0x10000000,
  275. } CONST_D3DPTFILTERCAPSFLAGS;
  276. /* D3DPRIMCAPS dwTextureBlendCaps */
  277. [helpcontext(87060)]
  278. typedef enum CONST_D3DPTBLENDCAPSFLAGS {
  279. D3DPTBLENDCAPS_DECAL =0x00000001,
  280. D3DPTBLENDCAPS_MODULATE =0x00000002,
  281. D3DPTBLENDCAPS_DECALALPHA =0x00000004,
  282. D3DPTBLENDCAPS_MODULATEALPHA =0x00000008,
  283. D3DPTBLENDCAPS_DECALMASK =0x00000010,
  284. D3DPTBLENDCAPS_MODULATEMASK =0x00000020,
  285. D3DPTBLENDCAPS_COPY =0x00000040,
  286. D3DPTBLENDCAPS_ADD =0x00000080,
  287. } CONST_D3DPTBLENDCAPSFLAGS;
  288. /* D3DPRIMCAPS dwTextureAddressCaps */
  289. [helpcontext(83279)]
  290. typedef enum CONST_D3DPTADDRESSCAPSFLAGS {
  291. D3DPTADDRESSCAPS_WRAP =0x00000001,
  292. D3DPTADDRESSCAPS_MIRROR =0x00000002,
  293. D3DPTADDRESSCAPS_CLAMP =0x00000004,
  294. D3DPTADDRESSCAPS_BORDER =0x00000008,
  295. D3DPTADDRESSCAPS_INDEPENDENTUV =0x00000010,
  296. D3DPTADDRESSCAPS_MIRRORONCE =0x00000020,
  297. } CONST_D3DPTADDRESSCAPSFLAGS;
  298. /* D3DDEVICEDESC dwStencilCaps */
  299. [helpcontext(83889)]
  300. typedef enum CONST_D3DSTENCILCAPFLAGS {
  301. D3DSTENCILCAPS_KEEP =0x00000001,
  302. D3DSTENCILCAPS_ZERO =0x00000002,
  303. D3DSTENCILCAPS_REPLACE =0x00000004,
  304. D3DSTENCILCAPS_INCRSAT =0x00000008,
  305. D3DSTENCILCAPS_DECRSAT =0x00000010,
  306. D3DSTENCILCAPS_INVERT =0x00000020,
  307. D3DSTENCILCAPS_INCR =0x00000040,
  308. D3DSTENCILCAPS_DECR =0x00000080,
  309. } CONST_D3DSTENCILCAPFLAGS;
  310. /* D3DDEVICEDESC dwTextureOpCaps */
  311. [helpcontext(83294)]
  312. typedef enum CONST_D3DTEXOPCAPSFLAGS {
  313. D3DTEXOPCAPS_DISABLE =0x00000001,
  314. D3DTEXOPCAPS_SELECTARG1 =0x00000002,
  315. D3DTEXOPCAPS_SELECTARG2 =0x00000004,
  316. D3DTEXOPCAPS_MODULATE =0x00000008,
  317. D3DTEXOPCAPS_MODULATE2X =0x00000010,
  318. D3DTEXOPCAPS_MODULATE4X =0x00000020,
  319. D3DTEXOPCAPS_ADD =0x00000040,
  320. D3DTEXOPCAPS_ADDSIGNED =0x00000080,
  321. D3DTEXOPCAPS_ADDSIGNED2X =0x00000100,
  322. D3DTEXOPCAPS_SUBTRACT =0x00000200,
  323. D3DTEXOPCAPS_ADDSMOOTH =0x00000400,
  324. D3DTEXOPCAPS_BLENDDIFFUSEALPHA =0x00000800,
  325. D3DTEXOPCAPS_BLENDTEXTUREALPHA =0x00001000,
  326. D3DTEXOPCAPS_BLENDFACTORALPHA =0x00002000,
  327. D3DTEXOPCAPS_BLENDTEXTUREALPHAPM =0x00004000,
  328. D3DTEXOPCAPS_BLENDCURRENTALPHA =0x00008000,
  329. D3DTEXOPCAPS_PREMODULATE =0x00010000,
  330. D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR =0x00020000,
  331. D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA =0x00040000,
  332. D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR =0x00080000,
  333. D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA =0x00100000,
  334. D3DTEXOPCAPS_BUMPENVMAP =0x00200000,
  335. D3DTEXOPCAPS_BUMPENVMAPLUMINANCE =0x00400000,
  336. D3DTEXOPCAPS_DOTPRODUCT3 =0x00800000,
  337. D3DTEXOPCAPS_MULTIPLYADD =0x01000000,
  338. D3DTEXOPCAPS_LERP =0x02000000,
  339. } CONST_D3DTEXOPCAPSFLAGS;
  340. /* D3DDEVICEDESC dwFVFCaps flags */
  341. [helpcontext(83259)]
  342. typedef enum CONST_D3DFVFCAPSFLAGS {
  343. D3DFVFCAPS_TEXCOORDCOUNTMASK = 0x0000ffff, /* mask for texture coordinate count field */
  344. D3DFVFCAPS_DONOTSTRIPELEMENTS = 0x00080000, /* Device prefers that vertex elements not be stripped */
  345. D3DFVFCAPS_PSIZE = 0x00100000, /* Device can receive point size */
  346. } CONST_D3DFVFCAPSFLAGS;
  347. /* D3DCAPS8 dwCaps flags */
  348. [helpcontext(83242)]
  349. typedef enum CONST_D3DCAPSFLAGS{
  350. D3DCAPS_READ_SCANLINE = 0x00020000,
  351. } CONST_D3DCAPSFLAGS;
  352. /* D3DCAPS8 dwCaps2 flags */
  353. [helpcontext(83241)]
  354. typedef enum CONST_D3DCAPS2FLAGS{
  355. D3DCAPS2_NO2DDURING3DSCENE = 0x00000002,
  356. D3DCAPS2_FULLSCREENGAMMA = 0x00020000,
  357. D3DCAPS2_CANRENDERWINDOWED = 0x00080000,
  358. D3DCAPS2_CANCALIBRATEGAMMA = 0x00100000,
  359. D3DCAPS2_RESERVED = 0x02000000,
  360. } CONST_D3DCAPS2FLAGS;
  361. /* D3DCAPS8 flags */
  362. [helpcontext(87061)]
  363. typedef enum CONST_D3DCAPS3FLAGS
  364. {
  365. //DDSVCAPS_STEREOSEQUENTIAL = 0x00000010,
  366. D3DCAPS3_RESERVED =0x8000001F
  367. } CONST_D3DCAPS3FLAGS;
  368. /* D3DCAPS8 Presentation Interval */
  369. [helpcontext(83275)]
  370. typedef enum CONST_D3DPRESENT_INTERVAL_FLAGS{
  371. D3DPRESENT_INTERVAL_DEFAULT = 0x00000000,
  372. D3DPRESENT_INTERVAL_ONE = 0x00000001,
  373. D3DPRESENT_INTERVAL_TWO = 0x00000002,
  374. D3DPRESENT_INTERVAL_THREE = 0x00000004,
  375. D3DPRESENT_INTERVAL_FOUR = 0x00000008,
  376. D3DPRESENT_INTERVAL_IMMEDIATE = 0x80000000,
  377. } CONST_D3DPRESENT_INTERVAL_FLAGS;
  378. /* D3DCAPS8 CursorCaps */
  379. [helpcontext(83252)]
  380. typedef enum CONST_D3DCURSORCAPSFLAGS {
  381. D3DCURSORCAPS_COLOR = 0x00000001,
  382. D3DCURSORCAPS_LOWRES = 0x00000002,
  383. } CONST_D3DCURSORCAPSFLAGS;
  384. /* D3DCAPS8 dwDevCaps flags */
  385. [helpcontext(83253)]
  386. typedef enum CONST_D3DDEVCAPSFLAGS {
  387. D3DDEVCAPS_EXECUTESYSTEMMEMORY =0x00000010, /* Device can use execute buffers from system memory */
  388. D3DDEVCAPS_EXECUTEVIDEOMEMORY =0x00000020, /* Device can use execute buffers from video memory */
  389. D3DDEVCAPS_TLVERTEXSYSTEMMEMORY =0x00000040, /* Device can use TL buffers from system memory */
  390. D3DDEVCAPS_TLVERTEXVIDEOMEMORY =0x00000080, /* Device can use TL buffers from video memory */
  391. D3DDEVCAPS_TEXTURESYSTEMMEMORY =0x00000100, /* Device can texture from system memory */
  392. D3DDEVCAPS_TEXTUREVIDEOMEMORY =0x00000200, /* Device can texture from device memory */
  393. D3DDEVCAPS_DRAWPRIMTLVERTEX =0x00000400, /* Device can draw TLVERTEX primitives */
  394. D3DDEVCAPS_CANRENDERAFTERFLIP =0x00000800, /* Device can render without waiting for flip to complete */
  395. D3DDEVCAPS_TEXTURENONLOCALVIDMEM =0x00001000, /* Device can texture from nonlocal video memory */
  396. D3DDEVCAPS_DRAWPRIMITIVES2 =0x00002000, /* Device can support DrawPrimitives2 */
  397. D3DDEVCAPS_SEPARATETEXTUREMEMORIES =0x00004000, /* Device is texturing from separate memory pools */
  398. D3DDEVCAPS_DRAWPRIMITIVES2EX =0x00008000, /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
  399. D3DDEVCAPS_HWTRANSFORMANDLIGHT =0x00010000, /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
  400. D3DDEVCAPS_CANBLTSYSTONONLOCAL =0x00020000, /* Device supports a Tex Blt from system memory to non-local vidmem */
  401. D3DDEVCAPS_HWRASTERIZATION =0x00080000, /* Device has HW acceleration for rasterization */
  402. D3DDEVCAPS_PUREDEVICE =0x00100000, /* Device supports D3DCREATE_PUREDEVICE */
  403. D3DDEVCAPS_QUINTICRTPATCHES =0x00200000, /* Device supports quintic Beziers and BSplines */
  404. D3DDEVCAPS_RTPATCHES =0x00400000, /* Device supports Rect and Tri patches */
  405. D3DDEVCAPS_RTPATCHHANDLEZERO =0x00800000, /* Indicates that RT Patches may be drawn efficiently using handle 0 */
  406. D3DDEVCAPS_NPATCHES =0x01000000, /* Device supports N-Patches */
  407. } CONST_D3DDEVCAPSFLAGS;
  408. /*
  409. * These are the flags in the D3DCAPS8.dwVertexProcessingCaps field
  410. */
  411. [helpcontext(83304)]
  412. typedef enum CONST_D3DVTXPCAPSFLAGS {
  413. /* device can do texgen */
  414. D3DVTXPCAPS_TEXGEN =0x00000001,
  415. /* device can do IDirect3DDevice8 colormaterialsource ops */
  416. D3DVTXPCAPS_MATERIALSOURCE7 =0x00000002,
  417. /* device can do directional lights */
  418. D3DVTXPCAPS_DIRECTIONALLIGHTS =0x00000008,
  419. /* device can do positional lights (includes point and spot) */
  420. D3DVTXPCAPS_POSITIONALLIGHTS =0x00000010,
  421. /* device can do local viewer */
  422. D3DVTXPCAPS_LOCALVIEWER =0x00000020,
  423. /* device can do vertex tweening */
  424. D3DVTXPCAPS_TWEENING =0x00000040,
  425. D3DVTXPCAPS_NO_VSDT_UBYTE4 =0x00000080,
  426. } CONST_D3DVTXPCAPSFLAGS;
  427. /******************************************* MORE ENUMS **********************************************/
  428. //From D3DTYPES.h
  429. // These bits could be ORed together to use with D3DRS_CLIPPLANEENABLE
  430. //
  431. [helpcontext(83245)]
  432. typedef enum CONST_D3DCLIPPLANEFLAGS {
  433. D3DCLIPPLANE0 =1,
  434. D3DCLIPPLANE1 =2,
  435. D3DCLIPPLANE2 =4,
  436. D3DCLIPPLANE3 =8,
  437. D3DCLIPPLANE4 =16,
  438. D3DCLIPPLANE5 =32,
  439. } CONST_D3DCLIPPLANEFLAGS;
  440. [helpcontext(83244)]
  441. typedef enum CONST_D3DCLIPFLAGS {
  442. D3DCS_LEFT =0x00000001,
  443. D3DCS_RIGHT =0x00000002,
  444. D3DCS_TOP =0x00000004,
  445. D3DCS_BOTTOM =0x00000008,
  446. D3DCS_FRONT =0x00000010,
  447. D3DCS_BACK =0x00000020,
  448. D3DCS_PLANE0 =0x00000040,
  449. D3DCS_PLANE1 =0x00000080,
  450. D3DCS_PLANE2 =0x00000100,
  451. D3DCS_PLANE3 =0x00000200,
  452. D3DCS_PLANE4 =0x00000400,
  453. D3DCS_PLANE5 =0x00000800,
  454. D3DCS_ALL =0x00000FFF,
  455. } CONST_D3DCLIPFLAGS;
  456. [helpcontext(87063)]
  457. typedef enum CONST_D3DCSFLAGS {
  458. D3DCS_STATUS = 0x00000001,
  459. D3DCS_EXTENTS2 = 0x00000002,
  460. D3DCS_EXTENTS3 = 0x00000004,
  461. } CONST_D3DCSFLAGS ;
  462. [helpcontext(83263)]
  463. typedef enum CONST_D3DLIGHTTYPE {
  464. D3DLIGHT_POINT = 1,
  465. D3DLIGHT_SPOT = 2,
  466. D3DLIGHT_DIRECTIONAL = 3,
  467. [hidden] D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  468. } CONST_D3DLIGHTTYPE;
  469. [helpcontext(83243)]
  470. typedef enum CONST_D3DCLEARFLAGS {
  471. D3DCLEAR_TARGET =0x00000001, /* Clear target surface */
  472. D3DCLEAR_ZBUFFER =0x00000002, /* Clear target z buffer */
  473. D3DCLEAR_STENCIL =0x00000004, /* Clear stencil planes */
  474. [hidden] D3DCLEAR_FORCE_DWORD =0x7FFFFFFF,
  475. } CONST_D3DCLEARFLAGS;
  476. [helpcontext(83286)]
  477. typedef enum CONST_D3DSHADEMODE {
  478. D3DSHADE_FLAT = 1,
  479. D3DSHADE_GOURAUD = 2,
  480. D3DSHADE_PHONG = 3,
  481. [hidden] D3DSHADE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  482. } CONST_D3DSHADEMODE;
  483. [helpcontext(83256)]
  484. typedef enum CONST_D3DFILLMODE {
  485. D3DFILL_POINT = 1,
  486. D3DFILL_WIREFRAME = 2,
  487. D3DFILL_SOLID = 3,
  488. [hidden] D3DFILL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  489. } CONST_D3DFILLMODE;
  490. [helpcontext(83240)]
  491. typedef enum CONST_D3DBLEND {
  492. D3DBLEND_ZERO = 1,
  493. D3DBLEND_ONE = 2,
  494. D3DBLEND_SRCCOLOR = 3,
  495. D3DBLEND_INVSRCCOLOR = 4,
  496. D3DBLEND_SRCALPHA = 5,
  497. D3DBLEND_INVSRCALPHA = 6,
  498. D3DBLEND_DESTALPHA = 7,
  499. D3DBLEND_INVDESTALPHA = 8,
  500. D3DBLEND_DESTCOLOR = 9,
  501. D3DBLEND_INVDESTCOLOR = 10,
  502. D3DBLEND_SRCALPHASAT = 11,
  503. D3DBLEND_BOTHSRCALPHA = 12,
  504. D3DBLEND_BOTHINVSRCALPHA = 13,
  505. [hidden] D3DBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  506. } CONST_D3DBLEND;
  507. [helpcontext(83295)]
  508. typedef enum CONST_D3DTEXTUREADDRESS {
  509. D3DTADDRESS_WRAP = 1,
  510. D3DTADDRESS_MIRROR = 2,
  511. D3DTADDRESS_CLAMP = 3,
  512. D3DTADDRESS_BORDER = 4,
  513. D3DTADDRESS_MIRRORONCE = 5,
  514. [hidden] D3DTADDRESS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  515. } CONST_D3DTEXTUREADDRESS;
  516. [helpcontext(83251)]
  517. typedef enum CONST_D3DCULL {
  518. D3DCULL_NONE = 1,
  519. D3DCULL_CW = 2,
  520. D3DCULL_CCW = 3,
  521. [hidden] D3DCULL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  522. } CONST_D3DCULL;
  523. [helpcontext(83246)]
  524. typedef enum CONST_D3DCMPFUNC {
  525. D3DCMP_NEVER = 1,
  526. D3DCMP_LESS = 2,
  527. D3DCMP_EQUAL = 3,
  528. D3DCMP_LESSEQUAL = 4,
  529. D3DCMP_GREATER = 5,
  530. D3DCMP_NOTEQUAL = 6,
  531. D3DCMP_GREATEREQUAL = 7,
  532. D3DCMP_ALWAYS = 8,
  533. [hidden] D3DCMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  534. } CONST_D3DCMPFUNC;
  535. [helpcontext(83290)]
  536. typedef enum CONST_D3DSTENCILOP {
  537. D3DSTENCILOP_KEEP = 1,
  538. D3DSTENCILOP_ZERO = 2,
  539. D3DSTENCILOP_REPLACE = 3,
  540. D3DSTENCILOP_INCRSAT = 4,
  541. D3DSTENCILOP_DECRSAT = 5,
  542. D3DSTENCILOP_INVERT = 6,
  543. D3DSTENCILOP_INCR = 7,
  544. D3DSTENCILOP_DECR = 8,
  545. [hidden] D3DSTENCILOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  546. } CONST_D3DSTENCILOP;
  547. [helpcontext(83857)]
  548. typedef enum CONST_D3DFOGMODE {
  549. D3DFOG_NONE = 0,
  550. D3DFOG_EXP = 1,
  551. D3DFOG_EXP2 = 2,
  552. D3DFOG_LINEAR = 3,
  553. [hidden] D3DFOG_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  554. } CONST_D3DFOGMODE;
  555. [helpcontext(83307)]
  556. typedef enum CONST_D3DZBUFFERTYPE {
  557. D3DZB_FALSE = 0,
  558. D3DZB_TRUE = 1, // Z buffering
  559. D3DZB_USEW = 2, // W buffering
  560. [hidden] D3DZB_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  561. } CONST_D3DZBUFFERTYPE;
  562. // Primitives supported by draw-primitive API
  563. [helpcontext(83277)]
  564. typedef enum CONST_D3DPRIMITIVETYPE {
  565. D3DPT_POINTLIST = 1,
  566. D3DPT_LINELIST = 2,
  567. D3DPT_LINESTRIP = 3,
  568. D3DPT_TRIANGLELIST = 4,
  569. D3DPT_TRIANGLESTRIP = 5,
  570. D3DPT_TRIANGLEFAN = 6,
  571. [hidden] D3DPT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  572. } CONST_D3DPRIMITIVETYPE;
  573. [helpcontext(83300)]
  574. typedef enum CONST_D3DTRANSFORMSTATETYPE {
  575. D3DTS_WORLD = 256,
  576. D3DTS_VIEW = 2,
  577. D3DTS_PROJECTION = 3,
  578. D3DTS_WORLD1 = 257, // 2nd matrix to blend
  579. D3DTS_WORLD2 = 258, // 3rd matrix to blend
  580. D3DTS_WORLD3 = 259, // 4th matrix to blend
  581. D3DTS_TEXTURE0 = 16,
  582. D3DTS_TEXTURE1 = 17,
  583. D3DTS_TEXTURE2 = 18,
  584. D3DTS_TEXTURE3 = 19,
  585. D3DTS_TEXTURE4 = 20,
  586. D3DTS_TEXTURE5 = 21,
  587. D3DTS_TEXTURE6 = 22,
  588. D3DTS_TEXTURE7 = 23,
  589. [hidden] D3DTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  590. } CONST_D3DTRANSFORMSTATETYPE;
  591. [helpcontext(83282)]
  592. typedef enum CONST_D3DRENDERSTATETYPE {
  593. D3DRS_ZENABLE = 7, /* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) */
  594. D3DRS_FILLMODE = 8, /* D3DFILL_MODE */
  595. D3DRS_SHADEMODE = 9, /* D3DSHADEMODE */
  596. D3DRS_LINEPATTERN = 10, /* D3DLINEPATTERN */
  597. D3DRS_ZWRITEENABLE = 14, /* TRUE to enable z writes */
  598. D3DRS_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */
  599. D3DRS_LASTPIXEL = 16, /* TRUE for last-pixel on lines */
  600. D3DRS_SRCBLEND = 19, /* D3DBLEND */
  601. D3DRS_DESTBLEND = 20, /* D3DBLEND */
  602. D3DRS_CULLMODE = 22, /* D3DCULL */
  603. D3DRS_ZFUNC = 23, /* D3DCMPFUNC */
  604. D3DRS_ALPHAREF = 24, /* D3DFIXED */
  605. D3DRS_ALPHAFUNC = 25, /* D3DCMPFUNC */
  606. D3DRS_DITHERENABLE = 26, /* TRUE to enable dithering */
  607. D3DRS_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */
  608. D3DRS_FOGENABLE = 28, /* TRUE to enable fog blending */
  609. D3DRS_SPECULARENABLE = 29, /* TRUE to enable specular */
  610. D3DRS_ZVISIBLE = 30, /* TRUE to enable z checking */
  611. D3DRS_FOGCOLOR = 34, /* D3DCOLOR */
  612. D3DRS_FOGTABLEMODE = 35, /* D3DFOGMODE */
  613. D3DRS_FOGSTART = 36, /* Fog start (for both vertex and pixel fog) */
  614. D3DRS_FOGEND = 37, /* Fog end */
  615. D3DRS_FOGDENSITY = 38, /* Fog density */
  616. D3DRS_EDGEANTIALIAS = 40, /* TRUE to enable edge antialiasing */
  617. //D3DRS_COLORKEYENABLE = 41, /* TRUE to enable source colorkeyed textures */
  618. D3DRS_ZBIAS = 47, /* LONG Z bias */
  619. D3DRS_RANGEFOGENABLE = 48, /* Enables range-based fog */
  620. D3DRS_STENCILENABLE = 52, /* BOOL enable/disable stenciling */
  621. D3DRS_STENCILFAIL = 53, /* D3DSTENCILOP to do if stencil test fails */
  622. D3DRS_STENCILZFAIL = 54, /* D3DSTENCILOP to do if stencil test passes and Z test fails */
  623. D3DRS_STENCILPASS = 55, /* D3DSTENCILOP to do if both stencil and Z tests pass */
  624. D3DRS_STENCILFUNC = 56, /* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */
  625. D3DRS_STENCILREF = 57, /* Reference value used in stencil test */
  626. D3DRS_STENCILMASK = 58, /* Mask value used in stencil test */
  627. D3DRS_STENCILWRITEMASK = 59, /* Write mask applied to values written to stencil buffer */
  628. D3DRS_TEXTUREFACTOR = 60, /* D3DCOLOR used for multi-texture blend */
  629. /*
  630. * 128 values [128, 255] are reserved for texture coordinate wrap flags.
  631. * These are constructed with the D3DWRAP_U and D3DWRAP_V macros. Using
  632. * a flags word preserves forward compatibility with texture coordinates
  633. * that are >2D.
  634. */
  635. D3DRS_WRAP0 = 128, /* wrap for 1st texture coord. set */
  636. D3DRS_WRAP1 = 129, /* wrap for 2nd texture coord. set */
  637. D3DRS_WRAP2 = 130, /* wrap for 3rd texture coord. set */
  638. D3DRS_WRAP3 = 131, /* wrap for 4th texture coord. set */
  639. D3DRS_WRAP4 = 132, /* wrap for 5th texture coord. set */
  640. D3DRS_WRAP5 = 133, /* wrap for 6th texture coord. set */
  641. D3DRS_WRAP6 = 134, /* wrap for 7th texture coord. set */
  642. D3DRS_WRAP7 = 135, /* wrap for 8th texture coord. set */
  643. D3DRS_CLIPPING = 136,
  644. D3DRS_LIGHTING = 137,
  645. // D3DRS_EXTENTS = 138,
  646. D3DRS_AMBIENT = 139,
  647. D3DRS_FOGVERTEXMODE = 140,
  648. D3DRS_COLORVERTEX = 141,
  649. D3DRS_LOCALVIEWER = 142,
  650. D3DRS_NORMALIZENORMALS = 143,
  651. // D3DRS_COLORKEYBLENDENABLE = 144,
  652. D3DRS_DIFFUSEMATERIALSOURCE = 145,
  653. D3DRS_SPECULARMATERIALSOURCE = 146,
  654. D3DRS_AMBIENTMATERIALSOURCE = 147,
  655. D3DRS_EMISSIVEMATERIALSOURCE = 148,
  656. D3DRS_VERTEXBLEND = 151,
  657. D3DRS_CLIPPLANEENABLE = 152,
  658. D3DRS_SOFTWAREVERTEXPROCESSING = 153,
  659. D3DRS_POINTSIZE = 154, /* FLOAT point size */
  660. D3DRS_POINTSIZE_MIN = 155, /* FLOAT point size min threshold */
  661. D3DRS_POINTSPRITE_ENABLE = 156, /* BOOL point texture coord control */
  662. D3DRS_POINTSCALE_ENABLE = 157, /* BOOL point size scale enable */
  663. D3DRS_POINTSCALE_A = 158, /* FLOAT point attenuation A value */
  664. D3DRS_POINTSCALE_B = 159, /* FLOAT point attenuation B value */
  665. D3DRS_POINTSCALE_C = 160, /* FLOAT point attenuation C value */
  666. D3DRS_MULTISAMPLE_ANTIALIAS = 161, // BOOL - set to do FSAA with multisample buffer
  667. D3DRS_MULTISAMPLE_MASK = 162, // DWORD - per-sample enable/disable
  668. D3DRS_PATCHEDGESTYLE = 163, // Sets whether patch edges will use FLOAT style tessellation
  669. D3DRS_PATCHSEGMENTS = 164, // Number of segments per edge when drawing patches
  670. D3DRS_DEBUGMONITORTOKEN = 165,
  671. D3DRS_POINT_SIZE_MAX = 166,
  672. D3DRS_INDEXVERTEXBLENDENABLE = 167,
  673. D3DRS_COLORWRITEENABLE = 168,
  674. D3DRS_TWEENFACTOR = 170, // FLOAT tween factor /?
  675. D3DRS_BLENDOP = 171, // D3DBLENDOP setting
  676. [hidden] D3DRS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  677. } CONST_D3DRENDERSTATETYPE;
  678. // Values for material source
  679. [helpcontext(83266)]
  680. typedef enum CONST_D3DMATERIALCOLORSOURCE
  681. {
  682. D3DMCS_MATERIAL = 0, // Color from material is used
  683. D3DMCS_COLOR1 = 1, // Diffuse vertex color is used
  684. D3DMCS_COLOR2 = 2, // Specular vertex color is used
  685. [hidden] D3DMCS_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
  686. } CONST_D3DMATERIALCOLORSOURCE;
  687. // Values for material source
  688. [helpcontext(83247)]
  689. typedef enum CONST_D3DCOLORWRITEENABLEFLAGS
  690. {
  691. D3DCOLORWRITEENABLE_RED= 1,
  692. D3DCOLORWRITEENABLE_GREEN= 2,
  693. D3DCOLORWRITEENABLE_BLUE= 4,
  694. D3DCOLORWRITEENABLE_ALPHA= 8,
  695. } CONST_D3DCOLORWRITEENABLEFLAGS;
  696. [helpcontext(83305)]
  697. typedef enum CONST_D3DWRAPBIAS {
  698. D3DRENDERSTATE_WRAPBIAS = 128
  699. } CONST_D3DWRAPBIAS;
  700. [helpcontext(83306)]
  701. typedef enum CONST_D3DWRAPFLAGS {
  702. D3DWRAP_U = 0x00000001,
  703. D3DWRAP_V = 0x00000002,
  704. D3DWRAP_W = 0x00000004,
  705. D3DWRAPCOORD_0 = 0x00000001, // same as D3DWRAP_U
  706. D3DWRAPCOORD_1 = 0x00000002, // same as D3DWRAP_V
  707. D3DWRAPCOORD_2 = 0x00000004,
  708. D3DWRAPCOORD_3 = 0x00000008,
  709. } CONST_D3DWRAPFLAGS;
  710. [helpcontext(83298)]
  711. typedef enum CONST_D3DTEXTURESTAGESTATETYPE
  712. {
  713. D3DTSS_COLOROP = 1, /* D3DTEXTUREOP - per-stage blending controls for color channels */
  714. D3DTSS_COLORARG1 = 2, /* D3DTA_* (texture arg) */
  715. D3DTSS_COLORARG2 = 3, /* D3DTA_* (texture arg) */
  716. D3DTSS_ALPHAOP = 4, /* D3DTEXTUREOP - per-stage blending controls for alpha channel */
  717. D3DTSS_ALPHAARG1 = 5, /* D3DTA_* (texture arg) */
  718. D3DTSS_ALPHAARG2 = 6, /* D3DTA_* (texture arg) */
  719. D3DTSS_BUMPENVMAT00 = 7, /* FLOAT (bump mapping matrix) */
  720. D3DTSS_BUMPENVMAT01 = 8, /* FLOAT (bump mapping matrix) */
  721. D3DTSS_BUMPENVMAT10 = 9, /* FLOAT (bump mapping matrix) */
  722. D3DTSS_BUMPENVMAT11 = 10, /* FLOAT (bump mapping matrix) */
  723. D3DTSS_TEXCOORDINDEX = 11, /* identifies which set of texture coordinates index this texture */
  724. D3DTSS_ADDRESSU = 13, /* D3DTEXTUREADDRESS for U coordinate */
  725. D3DTSS_ADDRESSV = 14, /* D3DTEXTUREADDRESS for V coordinate */
  726. D3DTSS_BORDERCOLOR = 15, /* D3DCOLOR */
  727. D3DTSS_MAGFILTER = 16, /* D3DTEXTUREFILTER filter to use for magnification */
  728. D3DTSS_MINFILTER = 17, /* D3DTEXTUREFILTER filter to use for minification */
  729. D3DTSS_MIPFILTER = 18, /* D3DTEXTUREFILTER filter to use between mipmaps during minification */
  730. D3DTSS_MIPMAPLODBIAS = 19, /* FLOAT Mipmap LOD bias */
  731. D3DTSS_MAXMIPLEVEL = 20, /* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) */
  732. D3DTSS_MAXANISOTROPY = 21, /* DWORD maximum anisotropy */
  733. D3DTSS_BUMPENVLSCALE = 22, /* FLOAT scale for bump map luminance */
  734. D3DTSS_BUMPENVLOFFSET = 23, /* FLOAT offset for bump map luminance */
  735. D3DTSS_TEXTURETRANSFORMFLAGS = 24, /* D3DTEXTURETRANSFORMFLAGS controls texture transform */
  736. D3DTSS_ADDRESSW = 25, /* D3DTEXTUREADDRESS for W coordinate */
  737. D3DTSS_COLORARG0 = 26, /* D3DTA_* third arg for triadic ops */
  738. D3DTSS_ALPHAARG0 = 27, /* D3DTA_* third arg for triadic ops */
  739. D3DTSS_RESULTARG = 28, /* D3DTA_* arg for result (CURRENT or TEMP) */
  740. [hidden] D3DTSS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  741. } CONST_D3DTEXTURESTAGESTATETYPE;
  742. [helpcontext(83301)]
  743. typedef enum CONST_D3DTSS_TCI_FLAGS {
  744. D3DTSS_TCI_PASSTHRU =0x00000000,
  745. D3DTSS_TCI_CAMERASPACENORMAL =0x00010000,
  746. D3DTSS_TCI_CAMERASPACEPOSITION =0x00020000,
  747. D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR =0x00030000,
  748. } CONST_D3DTSS_TCI_FLAGS ;
  749. [helpcontext(83297)]
  750. typedef enum CONST_D3DTEXTUREOP
  751. {
  752. // Control
  753. D3DTOP_DISABLE = 1, // disables stage
  754. D3DTOP_SELECTARG1 = 2, // the default
  755. D3DTOP_SELECTARG2 = 3,
  756. // Modulate
  757. D3DTOP_MODULATE = 4, // multiply args together
  758. D3DTOP_MODULATE2X = 5, // multiply and 1 bit
  759. D3DTOP_MODULATE4X = 6, // multiply and 2 bits
  760. // Add
  761. D3DTOP_ADD = 7, // add arguments together
  762. D3DTOP_ADDSIGNED = 8, // add with -0.5 bias
  763. D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit
  764. D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation
  765. D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product
  766. // Arg1 + Arg2 - Arg1*Arg2
  767. // = Arg1 + (1-Arg1)*Arg2
  768. // Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
  769. D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha
  770. D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha
  771. D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRENDERSTATE_TEXTUREFACTOR
  772. // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
  773. D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha
  774. D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color
  775. // Specular mapping
  776. D3DTOP_PREMODULATE = 17, // modulate with next texture before use
  777. D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB
  778. // COLOROP only
  779. D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A
  780. // COLOROP only
  781. D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, // (1-Arg1.A)*Arg2.RGB + Arg1.RGB
  782. // COLOROP only
  783. D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, // (1-Arg1.RGB)*Arg2.RGB + Arg1.A
  784. // COLOROP only
  785. // Bump mapping
  786. D3DTOP_BUMPENVMAP = 22, // per pixel env map perturbation
  787. D3DTOP_BUMPENVMAPLUMINANCE = 23, // with luminance channel
  788. // This can do either diffuse or specular bump mapping with correct input.
  789. // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B)
  790. // where each component has been scaled and offset to make it signed.
  791. // The result is replicated into all four (including alpha) channels.
  792. // This is a valid COLOROP only.
  793. D3DTOP_DOTPRODUCT3 = 24,
  794. // Triadic ops
  795. D3DTOP_MULTIPLYADD = 25, // Arg0 + Arg1*Arg2
  796. D3DTOP_LERP = 26, // (Arg0)*Arg1 + (1-Arg0)*Arg2
  797. [hidden]D3DTOP_FORCE_DWORD = 0x7fffffff,
  798. } CONST_D3DTEXTUREOP;
  799. [helpcontext(83293)]
  800. typedef enum CONST_D3DTAFLAGS
  801. {
  802. D3DTA_SELECTMASK = 0x0000000f, // mask for arg selector
  803. D3DTA_DIFFUSE = 0x00000000, // select diffuse color
  804. D3DTA_CURRENT = 0x00000001, // select result of previous stage
  805. D3DTA_TEXTURE = 0x00000002, // select texture color
  806. D3DTA_TFACTOR = 0x00000003, // select RENDERSTATE_TEXTUREFACTOR
  807. D3DTA_SPECULAR = 0x00000004, // select specular color
  808. D3DTA_TEMP = 0x00000005, // select temporary register color (read/write)
  809. D3DTA_COMPLEMENT = 0x00000010, // take 1.0 - x
  810. D3DTA_ALPHAREPLICATE = 0x00000020, // replicate alpha to color components
  811. } CONST_D3DTAFLAGS;
  812. [helpcontext(83296)]
  813. typedef enum CONST_D3DTEXTUREFILTERTYPE
  814. {
  815. D3DTEXF_NONE = 0,
  816. D3DTEXF_POINT = 1, // nearest
  817. D3DTEXF_LINEAR = 2, // linear interpolation
  818. D3DTEXF_ANISOTROPIC = 3, //
  819. D3DTEXF_FLATCUBIC = 4, // cubic
  820. D3DTEXF_GAUSSIANCUBIC = 5, // different cubic kernel
  821. [hidden] D3DTFG_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
  822. } CONST_D3DTEXTUREFILTERTYPE;
  823. // These flags are only for dx7 apps and are in dx7vb.dll
  824. //
  825. ///* Vertex Operations for ProcessVertices */
  826. // [helpcontext(83065)]
  827. //typedef enum CONST_D3DVOPFLAGS {
  828. // D3DVOP_LIGHT = 0x0A00,// (1 << 10)
  829. // D3DVOP_TRANSFORM =2,
  830. // D3DVOP_CLIP =4,
  831. // D3DVOP_EXTENTS =8,
  832. //} CONST_D3DVOPFLAGS;
  833. //-------------------------------------------------------------------
  834. // Flexible vertex format bits
  835. //
  836. [helpcontext(83260)]
  837. typedef enum CONST_D3DFVFFLAGS {
  838. D3DFVF_VERTEX =0x112,
  839. D3DFVF_RESERVED0 =0x001,
  840. D3DFVF_POSITION_MASK =0x00E,
  841. D3DFVF_XYZ =0x002,
  842. D3DFVF_XYZRHW =0x004,
  843. D3DFVF_XYZB1 =0x006,
  844. D3DFVF_XYZB2 =0x008,
  845. D3DFVF_XYZB3 =0x00a,
  846. D3DFVF_XYZB4 =0x00c,
  847. D3DFVF_XYZB5 =0x00e,
  848. D3DFVF_NORMAL =0x010,
  849. D3DFVF_PSIZE =0x020,
  850. D3DFVF_DIFFUSE =0x040,
  851. D3DFVF_SPECULAR =0x080,
  852. D3DFVF_TEXCOUNT_MASK =0xf00,
  853. D3DFVF_TEXCOUNT_SHIFT =8,
  854. D3DFVF_TEX0 =0x000,
  855. D3DFVF_TEX1 =0x100,
  856. D3DFVF_TEX2 =0x200,
  857. D3DFVF_TEX3 =0x300,
  858. D3DFVF_TEX4 =0x400,
  859. D3DFVF_TEX5 =0x500,
  860. D3DFVF_TEX6 =0x600,
  861. D3DFVF_TEX7 =0x700,
  862. D3DFVF_TEX8 =0x800,
  863. D3DFVF_LASTBETA_UBYTE4 =0x1000,
  864. D3DFVF_RESERVED2 =0xE000, // 4 reserved bits
  865. } CONST_D3DFVFFLAGS;
  866. // High order surfaces
  867. //
  868. [helpcontext(83262)]
  869. typedef enum CONST_D3DBASISTYPE
  870. {
  871. D3DBASIS_BEZIER = 0,
  872. D3DBASIS_BSPLINE = 1,
  873. D3DBASIS_INTERPOLATE = 2,
  874. } CONST_D3DBASISTYPE;
  875. [helpcontext(83268)]
  876. typedef enum CONST_D3DORDERTYPE
  877. {
  878. D3DORDER_LINEAR = 1,
  879. D3DORDER_CUBIC = 3,
  880. D3DORDER_QUINTIC = 5,
  881. } CONST_D3DORDERTYPE;
  882. [helpcontext(83067)]
  883. typedef enum CONST_D3DPATCHEDGESTYLE
  884. {
  885. D3DPATCHEDGE_DISCRETE = 0,
  886. D3DPATCHEDGE_CONTINUOUS = 1,
  887. } CONST_D3DPATCHEDGESTYLE;
  888. // To be used with GetInfo()
  889. [helpcontext(83257)]
  890. typedef enum CONST_D3DDEVINFOIDFLAGS {
  891. D3DDEVINFOID_TEXTUREMANAGER =1,
  892. D3DDEVINFOID_D3DTEXTUREMANAGER =2,
  893. D3DDEVINFOID_TEXTURING =3,
  894. } CONST_D3DDEVINFOIDFLAGS;
  895. [helpcontext(83288)]
  896. typedef enum CONST_D3DSTATEBLOCKTYPE
  897. {
  898. D3DSBT_ALL = 1, // capture all state
  899. D3DSBT_PIXELSTATE = 2, // capture pixel state
  900. D3DSBT_VERTEXSTATE = 3, // capture vertex state
  901. [hidden] D3DSBT_FORCE_DWORD = 0xffffffff
  902. } CONST_D3DSTATEBLOCKTYPE;
  903. // The D3DVERTEXBLENDFLAGS type is used with D3DRS_VERTEXBLEND state.
  904. //
  905. [helpcontext(83303)]
  906. typedef enum CONST_D3DVERTEXBLENDFLAGS
  907. {
  908. D3DVBF_DISABLE = 0, // Disable vertex blending
  909. D3DVBF_1WEIGHT = 1, // blend between 2 matrices
  910. D3DVBF_2WEIGHTS = 2, // blend between 3 matrices
  911. D3DVBF = 3, // blend between 4 matrices
  912. D3DVBF_TWEENING = 255, // blending using D3DRS_TWEENFACTOR
  913. D3DVBF_0WEIGHT = 256,
  914. } CONST_D3DVERTEXBLENDFLAGS;
  915. [helpcontext(83299)]
  916. typedef enum CONST_D3DTEXTURETRANSFORMFLAGS {
  917. D3DTTFF_DISABLE = 0, // texture coordinates are passed directly
  918. D3DTTFF_COUNT1 = 1, // rasterizer should expect 1-D texture coords
  919. D3DTTFF_COUNT2 = 2, // rasterizer should expect 2-D texture coords
  920. D3DTTFF_COUNT3 = 3, // rasterizer should expect 3-D texture coords
  921. D3DTTFF_COUNT4 = 4, // rasterizer should expect 4-D texture coords
  922. D3DTTFF_PROJECTED = 256, // texcoords to be divided by COUNTth element
  923. [hidden] D3DTTFF_FORCE_DWORD = 0x7fffffff,
  924. } CONST_D3DTEXTURETRANSFORMFLAGS;
  925. // Macros to set texture coordinate format bits in the FVF id
  926. //
  927. //#define D3DFVF_TEXTUREFORMAT2 0 // Two floating point values
  928. //#define D3DFVF_TEXTUREFORMAT1 3 // One floating point value
  929. //#define D3DFVF_TEXTUREFORMAT3 1 // Three floating point values
  930. //#define D3DFVF_TEXTUREFORMAT4 2 // Four floating point values
  931. //#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
  932. //#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
  933. //#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
  934. //#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
  935. [helpcontext(83261)]
  936. typedef enum CONST_D3DFVFTEXTUREFORMATS
  937. {
  938. D3DFVF_TEXTUREFORMAT2 = 0, // Two floating point values
  939. D3DFVF_TEXTUREFORMAT1 = 3, // One floating point value
  940. D3DFVF_TEXTUREFORMAT3 = 1, // Three floating point values
  941. D3DFVF_TEXTUREFORMAT4 = 2, // Four floating point values
  942. D3DFVF_TEXCOORDSIZE1_0 = 0x00030000, //3 << 16
  943. D3DFVF_TEXCOORDSIZE1_1 = 0x000C0000, //3 << 18
  944. D3DFVF_TEXCOORDSIZE1_2 = 0x00300000, //3 << 20
  945. D3DFVF_TEXCOORDSIZE1_3 = 0x00C00000, //3 << 22
  946. D3DFVF_TEXCOORDSIZE2_0 = 0,
  947. D3DFVF_TEXCOORDSIZE2_1 = 0,
  948. D3DFVF_TEXCOORDSIZE2_2 = 0,
  949. D3DFVF_TEXCOORDSIZE2_3 = 0,
  950. D3DFVF_TEXCOORDSIZE3_0 = 0x00010000, //1 << 16
  951. D3DFVF_TEXCOORDSIZE3_1 = 0x00040000, //1 << 18
  952. D3DFVF_TEXCOORDSIZE3_2 = 0x00100000, //1 << 20
  953. D3DFVF_TEXCOORDSIZE3_3 = 0x00400000, //1 << 22
  954. D3DFVF_TEXCOORDSIZE4_0 = 0x00020000, //2 << 16
  955. D3DFVF_TEXCOORDSIZE4_1 = 0x00080000, //2 << 18
  956. D3DFVF_TEXCOORDSIZE4_2 = 0x00200000, //2 << 20
  957. D3DFVF_TEXCOORDSIZE4_3 = 0x00800000, //2 << 22
  958. } CONST_D3DFVFTEXTUREFORMATS;
  959. /* Direct3D8 Device types */
  960. [helpcontext(83254)]
  961. typedef enum CONST_D3DDEVTYPE
  962. {
  963. D3DDEVTYPE_HAL = 1,
  964. D3DDEVTYPE_REF = 2,
  965. D3DDEVTYPE_SW = 3,
  966. [hidden] D3DDEVTYPE_FORCE_DWORD = 0x7fffffff
  967. } CONST_D3DDEVTYPE;
  968. /* Multi-Sample buffer types */
  969. [helpcontext(83267)]
  970. typedef enum CONST_D3DMULTISAMPLE_TYPE
  971. {
  972. D3DMULTISAMPLE_NONE = 0,
  973. D3DMULTISAMPLE_2_SAMPLES = 2,
  974. D3DMULTISAMPLE_3_SAMPLES = 3,
  975. D3DMULTISAMPLE_4_SAMPLES = 4,
  976. D3DMULTISAMPLE_5_SAMPLES = 5,
  977. D3DMULTISAMPLE_6_SAMPLES = 6,
  978. D3DMULTISAMPLE_7_SAMPLES = 7,
  979. D3DMULTISAMPLE_8_SAMPLES = 8,
  980. D3DMULTISAMPLE_9_SAMPLES = 9,
  981. D3DMULTISAMPLE_10_SAMPLES = 10,
  982. D3DMULTISAMPLE_11_SAMPLES = 11,
  983. D3DMULTISAMPLE_12_SAMPLES = 12,
  984. D3DMULTISAMPLE_13_SAMPLES = 13,
  985. D3DMULTISAMPLE_14_SAMPLES = 14,
  986. D3DMULTISAMPLE_15_SAMPLES = 15,
  987. D3DMULTISAMPLE_16_SAMPLES = 16,
  988. [hidden] D3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
  989. } CONST_D3DMULTISAMPLE_TYPE;
  990. /* Pool types */
  991. [helpcontext(83068)]
  992. typedef enum CONST_D3D_POOL {
  993. D3D_POOL_LOCALVIDMEM = 1,
  994. D3D_POOL_NONLOCALVIDMEM = 2,
  995. D3D_POOL_SYSTEMMEM = 3,
  996. D3D_POOL_USERALLOCATED = 4,
  997. D3D_POOL_D3DMANAGED = 5,
  998. D3D_POOL_MANAGED = 6,
  999. D3D_POOL_FORCE_DWORD = 0xffffffff
  1000. } CONST_D3D_POOL;
  1001. /* Formats
  1002. * Most of these names have the following convention:
  1003. * A = Alpha
  1004. * R = Red
  1005. * G = Green
  1006. * B = Blue
  1007. * X = Unused Bits
  1008. * P = Palette
  1009. * L = Luminance
  1010. * U = dU coordinate for BumpMap
  1011. * V = dV coordinate for BumpMap
  1012. * S = Stencil
  1013. * Z = Depth (e.g. Z or W buffer)
  1014. *
  1015. * Further, the order of the pieces are from MSB first; hence
  1016. * D3DFMT_A8L8 indicates that the high byte of this two byte
  1017. * format is alpha.
  1018. *
  1019. * For opaque formats (i.e. _UNKNOWN_), the following are used
  1020. * A = Alpha i.e. minimum number of bits per alpha channel
  1021. * C = Color i.e. minimum number of bits per color channel.
  1022. * S = Stencil i.e. minimum number of bit for stencil channel
  1023. * D = Integer Depth i.e. minimum number of bits for depth channel using an integer value
  1024. * F = Floating-point Depth i.e. minimum number of bits for depth channel using a floating point value
  1025. *
  1026. * _UNKNOWN_ formats do not indicate bit ordering per pixel and
  1027. * are not lockable formats. Also the actual number of bits per
  1028. * channel may be larger than that asked for.
  1029. */
  1030. [helpcontext(83258)]
  1031. typedef enum CONST_D3DFORMAT
  1032. {
  1033. D3DFMT_UNKNOWN = 0,
  1034. D3DFMT_R8G8B8 = 20,
  1035. D3DFMT_A8R8G8B8 = 21,
  1036. D3DFMT_X8R8G8B8 = 22,
  1037. D3DFMT_R5G6B5 = 23,
  1038. D3DFMT_X1R5G5B5 = 24,
  1039. D3DFMT_A1R5G5B5 = 25,
  1040. D3DFMT_A4R4G4B4 = 26,
  1041. D3DFMT_R3G3B2 = 27,
  1042. D3DFMT_A8 = 28,
  1043. D3DFMT_A8R3G3B2 = 29,
  1044. D3DFMT_X4R4G4B4 = 30,
  1045. D3DFMT_A8P8 = 40,
  1046. D3DFMT_P8 = 41,
  1047. D3DFMT_L8 = 50,
  1048. D3DFMT_A8L8 = 51,
  1049. D3DFMT_A4L4 = 52,
  1050. D3DFMT_V8U8 = 60,
  1051. D3DFMT_L6V5U5 = 61,
  1052. D3DFMT_X8L8V8U8 = 62,
  1053. D3DFMT_Q8W8V8U8 = 63,
  1054. D3DFMT_V16U16 = 64,
  1055. D3DFMT_W11V11U10 = 65,
  1056. D3DFMT_UYVY = 0x59565955, //MAKEFOURCC('U', 'Y', 'V', 'Y')
  1057. D3DFMT_YUY2 = 0x32595559, //MAKEFOURCC('Y', 'U', 'Y', '2'),
  1058. D3DFMT_DXT1 = 0x31545844, //MAKEFOURCC('D', 'X', 'T', '1'),
  1059. D3DFMT_DXT2 = 0x32545844, //MAKEFOURCC('D', 'X', 'T', '2'),
  1060. D3DFMT_DXT3 = 0x33545844, //MAKEFOURCC('D', 'X', 'T', '3'),
  1061. D3DFMT_DXT4 = 0x34545844, //MAKEFOURCC('D', 'X', 'T', '4'),
  1062. D3DFMT_DXT5 = 0x35545844, //MAKEFOURCC('D', 'X', 'T', '5'),
  1063. D3DFMT_D16_LOCKABLE = 70,
  1064. D3DFMT_D32 = 71,
  1065. D3DFMT_D15S1 = 73,
  1066. D3DFMT_D24S8 = 75,
  1067. D3DFMT_D24X8 = 77,
  1068. D3DFMT_D24X4S4 = 79,
  1069. D3DFMT_D16 = 80,
  1070. D3DFMT_VERTEXDATA =100,
  1071. D3DFMT_INDEX16 =101,
  1072. D3DFMT_INDEX32 =102,
  1073. [hidden] D3DFMT_FORCE_DWORD =0x7FFFFFFF
  1074. } CONST_D3DFORMAT;
  1075. /* SwapEffects */
  1076. [helpcontext(83292)]
  1077. typedef enum CONST_D3DSWAPEFFECT
  1078. {
  1079. D3DSWAPEFFECT_DISCARD = 1,
  1080. D3DSWAPEFFECT_FLIP = 2,
  1081. D3DSWAPEFFECT_COPY = 3,
  1082. D3DSWAPEFFECT_COPY_VSYNC = 4,
  1083. D3DSWAPEFFECT_FORCE_DWORD = 0x7FFFFFFF
  1084. } CONST_D3DSWAPEFFECT;
  1085. /* Pool types */
  1086. [helpcontext(83273)]
  1087. typedef enum CONST_D3DPOOL {
  1088. D3DPOOL_DEFAULT = 0,
  1089. D3DPOOL_MANAGED = 1,
  1090. D3DPOOL_SYSTEMMEM = 2,
  1091. [hidden] D3DPOOL_FORCE_DWORD = 0x7fffffff
  1092. } CONST_D3DPOOL;
  1093. [helpcontext(83239)]
  1094. typedef enum CONST_D3DBACKBUFFERTYPE {
  1095. D3DBACKBUFFER_TYPE_MONO = 0,
  1096. D3DBACKBUFFER_TYPE_LEFT = 1,
  1097. D3DBACKBUFFER_TYPE_RIGHT = 2,
  1098. [hidden] D3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff
  1099. } CONST_D3DBACKBUFFERTYPE;
  1100. [helpcontext(83276)]
  1101. typedef enum CONST_D3DPRESENT_RATE_FLAGS
  1102. {
  1103. /* RefreshRate pre-defines */
  1104. D3DPRESENT_RATE_DEFAULT = 0x00000000,
  1105. D3DPRESENT_RATE_UNLIMITED = 0x7FFFFFFF,
  1106. } CONST_D3DPRESENT_RATE_FLAGS ;
  1107. /* Types */
  1108. [helpcontext(83283)]
  1109. typedef enum CONST_D3DRESOURCETYPE {
  1110. D3DRTYPE_SURFACE = 1,
  1111. D3DRTYPE_VOLUME = 2,
  1112. D3DRTYPE_TEXTURE = 3,
  1113. D3DRTYPE_VOLUMETEXTURE = 4,
  1114. D3DRTYPE_CUBETEXTURE = 5,
  1115. D3DRTYPE_VERTEXBUFFER = 6,
  1116. D3DRTYPE_INDEXBUFFER = 7,
  1117. [hidden] D3DRTYPE_FORCE_DWORD = 0x7fffffff
  1118. } CONST_D3DRESOURCETYPE;
  1119. /* Usages */
  1120. [helpcontext(83302)]
  1121. typedef enum CONST_D3DUSAGEFLAGS {
  1122. D3DUSAGE_RENDERTARGET = 1,
  1123. D3DUSAGE_DEPTHSTENCIL = 2,
  1124. /* Usages for Vertex/Index buffers */
  1125. D3DUSAGE_WRITEONLY = 8,
  1126. D3DUSAGE_SOFTWAREPROCESSING= 0x10,
  1127. D3DUSAGE_DONOTCLIP = 0x20,
  1128. D3DUSAGE_POINTS = 0x40,
  1129. D3DUSAGE_RTPATCHES = 0x80,
  1130. D3DUSAGE_NPATCHES = 0x0100,
  1131. D3DUSAGE_DYNAMIC = 0x0200,
  1132. [hidden]D3DUSAGE_FORCE_DWORD = 0x7FFFFFFF,
  1133. } CONST_D3DUSAGEFLAGS;
  1134. /* CubeMap Face identifiers */
  1135. [helpcontext(83250)]
  1136. typedef enum CONST_D3DCUBEMAP_FACES
  1137. {
  1138. D3DCUBEMAP_FACE_POSITIVE_X = 0,
  1139. D3DCUBEMAP_FACE_NEGATIVE_X = 1,
  1140. D3DCUBEMAP_FACE_POSITIVE_Y = 2,
  1141. D3DCUBEMAP_FACE_NEGATIVE_Y = 3,
  1142. D3DCUBEMAP_FACE_POSITIVE_Z = 4,
  1143. D3DCUBEMAP_FACE_NEGATIVE_Z = 5,
  1144. [hidden] D3DCUBEMAP_FACE_FORCE_DWORD = 0x7fffffff
  1145. } CONST_D3DCUBEMAP_FACES;
  1146. [helpcontext(83265)]
  1147. typedef enum CONST_D3DLOCKFLAGS {
  1148. /* Lock flags */
  1149. D3DLOCK_READONLY = 0x00000010,
  1150. D3DLOCK_DISCARD = 0x00002000,
  1151. D3DLOCK_NOOVERWRITE = 0x00001000,
  1152. D3DLOCK_NOSYSLOCK = 0x00000800,
  1153. D3DLOCK_NO_DIRTY_UPDATE = 0x00008000,
  1154. } CONST_D3DLOCKFLAGS;
  1155. /*********************************************************************/
  1156. //#define _FACDD 0x876
  1157. //#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  1158. [helpcontext(83255)]
  1159. typedef enum CONST_D3DERR {
  1160. D3DERR_WRONGTEXTUREFORMAT =0x88760818, //MAKE_DDHRESULT(2072)
  1161. D3DERR_UNSUPPORTEDCOLOROPERATION =0x88760819, //MAKE_DDHRESULT(2073)
  1162. D3DERR_UNSUPPORTEDCOLORARG =0x8876081A, //MAKE_DDHRESULT(2074)
  1163. D3DERR_UNSUPPORTEDALPHAOPERATION =0x8876081B, //MAKE_DDHRESULT(2075)
  1164. D3DERR_UNSUPPORTEDALPHAARG =0x8876081C, //MAKE_DDHRESULT(2076)
  1165. D3DERR_TOOMANYOPERATIONS =0x8876081D, //MAKE_DDHRESULT(2077)
  1166. D3DERR_CONFLICTINGTEXTUREFILTER =0x8876081E, //MAKE_DDHRESULT(2078)
  1167. D3DERR_UNSUPPORTEDFACTORVALUE =0x8876081F, //MAKE_DDHRESULT(2079)
  1168. D3DERR_CONFLICTINGRENDERSTATE =0x88760821, //MAKE_DDHRESULT(2081)
  1169. D3DERR_UNSUPPORTEDTEXTUREFILTER =0x88760822, //MAKE_DDHRESULT(2082)
  1170. D3DERR_CONFLICTINGTEXTUREPALETTE =0x88760826, //MAKE_DDHRESULT(2086)
  1171. D3DERR_DRIVERINTERNALERROR =0x88760827, //MAKE_DDHRESULT(2087)
  1172. D3DERR_NOTFOUND =0x88760866, //MAKE_DDHRESULT(2150)
  1173. D3DERR_MOREDATA =0x88760867, //MAKE_DDHRESULT(2151)
  1174. D3DERR_DEVICELOST =0x88760868, //MAKE_DDHRESULT(2152)
  1175. D3DERR_DEVICENOTRESET =0x88760869, //MAKE_DDHRESULT(2153)
  1176. D3DERR_NOTAVAILABLE =0x8876086A, //MAKE_DDHRESULT(2154)
  1177. D3DERR_OUTOFVIDEOMEMORY =0x8876017C, //MAKE_DDHRESULT(380)
  1178. D3DERR_INVALIDDEVICE =0x8876086B, //MAKE_DDHRESULT(2155)
  1179. D3DERR_INVALIDCALL =0x8876086C, //MAKE_DDHRESULT(2156)
  1180. D3DERR_DRIVERINVALIDCALL =0x8876086D, //MAKE_DDHRESULT(2157)
  1181. } CONST_D3DERR;
  1182. [helpcontext(83287)]
  1183. typedef enum CONST_D3DSPDFLAGS
  1184. {
  1185. D3DSPD_IUNKNOWN= 0x00000001
  1186. } CONST_D3DSPDFLAGS ;
  1187. [helpcontext(83248)]
  1188. typedef enum CONST_D3DCONST {
  1189. D3DCURRENT_DISPLAY_MODE = 0x00EFFFFF,
  1190. // D3DENUM_HOST_ADAPTER = 0x00000001,
  1191. D3DENUM_NO_WHQL_LEVEL = 0x00000002,
  1192. D3DADAPTER_DEFAULT = 0,
  1193. D3DPRESENT_BACK_BUFFERS_MAX = 3,
  1194. //D3DDP_WAIT = 0x00000001,
  1195. D3DMAXNUMVERTICES = 0x0000FFFF,
  1196. D3DMAXNUMPRIMITIVES = 0x0000FFFF,
  1197. D3DPV_DONOTCOPYDATA = 1,
  1198. VALID_D3DENUM_FLAGS = 3,
  1199. D3DCURSOR_IMMEDIATE_UPDATE = 0x00000001,
  1200. D3DPRESENTFLAG_LOCKABLE_BACKBUFFER = 0x00000001,
  1201. D3D_OK = 0,
  1202. D3DMAXUSERCLIPPLANES = 32,
  1203. } CONST_D3DCONST;
  1204. [helpcontext(83405)]
  1205. typedef enum CONST_D3DBLENDOP {
  1206. D3DBLENDOP_ADD = 1,
  1207. D3DBLENDOP_SUBTRACT = 2,
  1208. D3DBLENDOP_REVSUBTRACT = 3,
  1209. D3DBLENDOP_MIN = 4,
  1210. D3DBLENDOP_MAX = 5,
  1211. [hidden] D3DBLENDOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  1212. } CONST_D3DBLENDOP;
  1213. [helpcontext(83249)]
  1214. typedef enum CONST_D3DCREATEFLAGS {
  1215. D3DCREATE_FPU_PRESERVE = 0x00000002,
  1216. D3DCREATE_MULTITHREADED = 0x00000004,
  1217. D3DCREATE_PUREDEVICE = 0x00000010,
  1218. D3DCREATE_SOFTWARE_VERTEXPROCESSING = 0x00000020,
  1219. D3DCREATE_HARDWARE_VERTEXPROCESSING = 0x00000040,
  1220. D3DCREATE_MIXED_VERTEXPROCESSING = 0x00000080,
  1221. } CONST_D3DCREATEFLAGS;
  1222. [helpcontext(83285)]
  1223. typedef enum CONST_D3DSGRFLAGS {
  1224. D3DSGR_NO_CALIBRATION = 0x00000000,
  1225. D3DSGR_CALIBRATE = 0x00000001,
  1226. } CONST_D3DSGRFLAGS;
  1227. [helpcontext(83069)]
  1228. typedef enum CONST_D3D_TYPE {
  1229. D3D_TYPE_SURFACE = 1,
  1230. D3D_TYPE_VOLUME = 2,
  1231. D3D_TYPE_MIPMAP = 3,
  1232. D3D_TYPE_MIPVOLUME = 4,
  1233. D3D_TYPE_CUBEMAP = 5,
  1234. D3D_TYPE_VERTEXBUFFER = 6,
  1235. D3D_TYPE_OPTIMIZEDVERTEXBUFFER = 7,
  1236. D3D_TYPE_INDEXBUFFER = 8,
  1237. D3D_TYPE_FORCE_DWORD = 0x7fffffff
  1238. } CONST_D3D_TYPE;
  1239. [helpcontext(83284)]
  1240. typedef enum CONST_D3DSCPFLAGS {
  1241. D3DUCURSOR_DEFAULT =0,
  1242. D3DUCURSOR_IMMEDIATE_UPDATE=1,
  1243. } CONST_D3DSCPFLAGS;
  1244. //BUGBUG TODO
  1245. //D3DERROR CODE ENUM
  1246. [helpcontext(83070)]
  1247. typedef enum CONST_D3DDEBUGMONITORTOKENS
  1248. {
  1249. D3DDMT_ENABLE=0,
  1250. D3DDMT_DISABLE=1,
  1251. [hidden] D3DDMT_FORCEDWORD=0x7fffffff,
  1252. } CONST_D3DDEBUGMONITORTOKENS ;
  1253. #endif
  1254. /************************************** STRUCTS ********************************************/
  1255. [helpcontext(83071)]
  1256. typedef struct D3DDEVICE_CREATION_PARAMETERS
  1257. {
  1258. UINT AdapterOrdinal;
  1259. CONST_D3DDEVTYPE DeviceType;
  1260. HWND hFocusWindow;
  1261. DWORD BehaviorFlags;
  1262. } D3DDEVICE_CREATION_PARAMETERS;
  1263. [helpcontext(83206)]
  1264. typedef struct D3DCLIPSTATUS8_CDESC
  1265. {
  1266. DWORD ClipUnion;
  1267. DWORD ClipIntersection;
  1268. } D3DCLIPSTATUS8_CDESC;
  1269. [helpcontext(83225)]
  1270. typedef struct D3DRECT_CDESC {
  1271. LONG x1;
  1272. LONG y1;
  1273. LONG x2;
  1274. LONG y2;
  1275. } D3DRECT_CDESC;
  1276. //[helpcontext(89225)]
  1277. //typedef struct D3DPOINT_CDESC {
  1278. // LONG x;
  1279. // LONG y;
  1280. //} D3DPOINT_CDESC;
  1281. //[helpcontext(89226)]
  1282. //typedef struct D3DHVERTEX_CDESC {
  1283. // DWORD dwFlags; /* Homogeneous clipping flags */
  1284. // D3DVALUE hx;
  1285. // D3DVALUE hy;
  1286. // D3DVALUE hz;
  1287. //} D3DHVERTEX_CDESC;
  1288. [helpcontext(83228)]
  1289. typedef struct D3DTLVERTEX_CDESC {
  1290. D3DVALUE sx; /* Screen coordinates */
  1291. D3DVALUE sy;
  1292. D3DVALUE sz;
  1293. D3DVALUE rhw; /* Reciprocal of homogeneous w */
  1294. D3DCOLOR color; /* Vertex color */
  1295. D3DCOLOR specular; /* Specular component of vertex */
  1296. D3DVALUE tu; /* Texture coordinates */
  1297. D3DVALUE tv;
  1298. } D3DTLVERTEX_CDESC;
  1299. [helpcontext(83216)]
  1300. typedef struct D3DLVERTEX_CDESC {
  1301. D3DVALUE x;
  1302. D3DVALUE y;
  1303. D3DVALUE z;
  1304. D3DCOLOR color; /* Vertex color */
  1305. D3DCOLOR specular; /* Specular component of vertex */
  1306. D3DVALUE tu; /* Texture coordinates */
  1307. D3DVALUE tv;
  1308. } D3DLVERTEX_CDESC;
  1309. [helpcontext(83231)]
  1310. typedef struct D3DVERTEX_CDESC {
  1311. D3DVALUE x;
  1312. D3DVALUE y;
  1313. D3DVALUE z;
  1314. D3DVALUE nx; /* Normal */
  1315. D3DVALUE ny;
  1316. D3DVALUE nz;
  1317. D3DVALUE tu; /* Texture coordinates */
  1318. D3DVALUE tv;
  1319. } D3DVERTEX_CDESC;
  1320. [helpcontext(83229)]
  1321. typedef struct D3DTLVERTEX2_CDESC {
  1322. D3DVALUE sx; /* Screen coordinates */
  1323. D3DVALUE sy;
  1324. D3DVALUE sz;
  1325. D3DVALUE rhw; /* Reciprocal of homogeneous w */
  1326. D3DCOLOR color; /* Vertex color */
  1327. D3DCOLOR specular; /* Specular component of vertex */
  1328. D3DVALUE tu1; /* Texture coordinates */
  1329. D3DVALUE tv1;
  1330. D3DVALUE tu2; /* Texture coordinates */
  1331. D3DVALUE tv2;
  1332. } D3DTLVERTEX2_CDESC;
  1333. [helpcontext(83217)]
  1334. typedef struct D3DLVERTEX2_CDESC {
  1335. D3DVALUE x;
  1336. D3DVALUE y;
  1337. D3DVALUE z;
  1338. D3DCOLOR color; /* Vertex color */
  1339. D3DCOLOR specular; /* Specular component of vertex */
  1340. D3DVALUE tu1; /* Texture coordinates */
  1341. D3DVALUE tv1;
  1342. D3DVALUE tu2; /* Texture coordinates */
  1343. D3DVALUE tv2;
  1344. } D3DLVERTEX2_CDESC;
  1345. [helpcontext(83235)]
  1346. typedef struct D3DVERTEX2_CDESC {
  1347. D3DVALUE x;
  1348. D3DVALUE y;
  1349. D3DVALUE z;
  1350. D3DVALUE nx; /* Normal */
  1351. D3DVALUE ny;
  1352. D3DVALUE nz;
  1353. D3DVALUE tu1; /* Texture coordinates */
  1354. D3DVALUE tv1;
  1355. D3DVALUE tu2; /* Texture coordinates */
  1356. D3DVALUE tv2;
  1357. } D3DVERTEX2_CDESC;
  1358. /* Display Modes */
  1359. [helpcontext(83289)]
  1360. typedef struct D3DDISPLAYMODE_CDESC
  1361. {
  1362. UINT Width;
  1363. UINT Height;
  1364. UINT RefreshRate;
  1365. CONST_D3DFORMAT Format;
  1366. } D3DDISPLAYMODE_CDESC;
  1367. [helpcontext(83224)]
  1368. typedef struct D3DRASTER_STATUS_CDESC
  1369. {
  1370. BOOL InVBLANK;
  1371. UINT ScanLine;
  1372. } D3DRASTER_STATUS_CDESC;
  1373. /* Resize Optional Parameters */
  1374. [helpcontext(83221)]
  1375. typedef struct D3DPRESENT_PARAMETERS_CDESC
  1376. {
  1377. UINT BackBufferWidth;
  1378. UINT BackBufferHeight;
  1379. CONST_D3DFORMAT BackBufferFormat;
  1380. UINT BackBufferCount;
  1381. CONST_D3DMULTISAMPLE_TYPE MultiSampleType;
  1382. CONST_D3DSWAPEFFECT SwapEffect;
  1383. HWND hDeviceWindow;
  1384. BOOL Windowed;
  1385. BOOL EnableAutoDepthStencil;
  1386. CONST_D3DFORMAT AutoDepthStencilFormat;
  1387. DWORD Flags;
  1388. /* Following elements must be zero for Windowed mode */
  1389. UINT FullScreen_RefreshRateInHz;
  1390. UINT FullScreen_PresentationInterval;
  1391. } D3DPRESENT_PARAMETERS_CDESC;
  1392. [helpcontext(83210)]
  1393. typedef struct D3DGAMMARAMP_CDESC
  1394. {
  1395. WORD red [256];
  1396. WORD green[256];
  1397. WORD blue [256];
  1398. } D3DGAMMARAMP_CDESC;
  1399. /*
  1400. * structures and definitions.
  1401. */
  1402. [helpcontext(83212)]
  1403. typedef struct D3DLIGHT8_CDESC {
  1404. CONST_D3DLIGHTTYPE Type; /* Type of light source */
  1405. D3DCOLORVALUE_CDESC Diffuse; /* Diffuse color of light */
  1406. D3DCOLORVALUE_CDESC Specular; /* Specular color of light */
  1407. D3DCOLORVALUE_CDESC Ambient; /* Ambient color of light */
  1408. D3DVECTOR_CDESC Position; /* Position in world space */
  1409. D3DVECTOR_CDESC Direction; /* Direction in world space */
  1410. D3DVALUE Range; /* Cutoff range */
  1411. D3DVALUE Falloff; /* Falloff */
  1412. D3DVALUE Attenuation0; /* Constant attenuation */
  1413. D3DVALUE Attenuation1; /* Linear attenuation */
  1414. D3DVALUE Attenuation2; /* Quadratic attenuation */
  1415. D3DVALUE Theta; /* Inner angle of spotlight cone */
  1416. D3DVALUE Phi; /* Outer angle of spotlight cone */
  1417. } D3DLIGHT8_CDESC;
  1418. /* Vertex Buffer Description */
  1419. [helpcontext(83236)]
  1420. typedef struct D3DVERTEXBUFFER_DESC_CDESC
  1421. {
  1422. CONST_D3DFORMAT Format;
  1423. CONST_D3DRESOURCETYPE Type;
  1424. DWORD Usage;
  1425. CONST_D3DPOOL Pool;
  1426. UINT Size;
  1427. DWORD FVF;
  1428. } D3DVERTEXBUFFER_DESC_CDESC;
  1429. /* Index Buffer Description */
  1430. [helpcontext(83211)]
  1431. typedef struct D3DINDEXBUFFER_DESC_CDESC
  1432. {
  1433. CONST_D3DFORMAT Format;
  1434. CONST_D3DRESOURCETYPE Type;
  1435. DWORD Usage;
  1436. CONST_D3DPOOL Pool;
  1437. UINT Size;
  1438. } D3DINDEXBUFFER_DESC_CDESC;
  1439. /* Surface Description */
  1440. [helpcontext(83227)]
  1441. typedef struct D3DSURFACE_DESC_CDESC
  1442. {
  1443. CONST_D3DFORMAT Format;
  1444. CONST_D3DRESOURCETYPE Type;
  1445. DWORD Usage;
  1446. CONST_D3DPOOL Pool;
  1447. UINT Size;
  1448. CONST_D3DMULTISAMPLE_TYPE MultiSampleType;
  1449. UINT Width;
  1450. UINT Height;
  1451. } D3DSURFACE_DESC_CDESC;
  1452. [helpcontext(83238)]
  1453. typedef struct D3DVOLUME_DESC_CDESC
  1454. {
  1455. CONST_D3DFORMAT Format;
  1456. CONST_D3DRESOURCETYPE Type;
  1457. DWORD Usage;
  1458. CONST_D3DPOOL Pool;
  1459. UINT Size;
  1460. UINT Width;
  1461. UINT Height;
  1462. UINT Depth;
  1463. } D3DVOLUME_DESC_CDESC;
  1464. /* Structure for LockRect */
  1465. [helpcontext(83215)]
  1466. typedef struct D3DLOCKED_RECT_CDESC
  1467. {
  1468. INT Pitch;
  1469. LONG pBits;
  1470. } D3DLOCKED_RECT_CDESC;
  1471. /* Structures for LockBox */
  1472. [helpcontext(83204)]
  1473. typedef struct D3DBOX_CDESC
  1474. {
  1475. UINT left;
  1476. UINT top;
  1477. UINT right;
  1478. UINT bottom;
  1479. UINT front;
  1480. UINT back;
  1481. } D3DBOX_CDESC;
  1482. [helpcontext(83214)]
  1483. typedef struct D3DLOCKED_BOX_CDESC
  1484. {
  1485. INT RowPitch;
  1486. INT SlicePitch;
  1487. LONG pBits;
  1488. } D3DLOCKED_BOX_CDESC;
  1489. /* Structures for LockRange */
  1490. [helpcontext(83223)]
  1491. typedef struct D3DRANGE_CDESC
  1492. {
  1493. UINT Offset;
  1494. UINT Size;
  1495. } D3DRANGE_CDESC;
  1496. #define MAX_DEVICE_IDENTIFIER_STRING 512
  1497. [helpcontext(83203)]
  1498. typedef struct D3DADAPTER_IDENTIFIER8_CDESC
  1499. {
  1500. CHAR Driver[MAX_DEVICE_IDENTIFIER_STRING];
  1501. CHAR Description[MAX_DEVICE_IDENTIFIER_STRING];
  1502. DWORD DriverVersionLowPart;
  1503. DWORD DriverVersionHighPart;
  1504. DWORD VendorId;
  1505. DWORD DeviceId;
  1506. DWORD SubSysId;
  1507. DWORD Revision;
  1508. GUID DeviceIdentifier;
  1509. DWORD WHQLLevel;
  1510. } D3DADAPTER_IDENTIFIER8_CDESC;
  1511. [helpcontext(83226)]
  1512. typedef struct D3DRECTPATCH_INFO_CDESC
  1513. {
  1514. LONG StartVertexOffsetWidth;
  1515. LONG StartVertexOffsetHeight;
  1516. LONG Width;
  1517. LONG Height;
  1518. LONG Stride;
  1519. CONST_D3DBASISTYPE Basis;
  1520. CONST_D3DORDERTYPE Order;
  1521. } D3DRECTPATCH_INFO_CDESC;
  1522. [helpcontext(83230)]
  1523. typedef struct D3DTRIPATCH_INFO_CDESC
  1524. {
  1525. LONG StartVertexOffsetWidth;
  1526. LONG NumVertices;
  1527. CONST_D3DBASISTYPE Basis;
  1528. CONST_D3DORDERTYPE Order;
  1529. } D3DTRIPATCH_INFO_CDESC;
  1530. /**************************************************************************************/
  1531. [helpcontext(83213)]
  1532. typedef struct D3DLINEPATTERN_CDESC {
  1533. WORD RepeatFactor;
  1534. WORD LinePattern;
  1535. } D3DLINEPATTERN_CDESC;
  1536. // [helpcontext(83344)]
  1537. //typedef struct D3DPRIMCAPS8_CDESC {
  1538. // DWORD SizeOfType;
  1539. // DWORD MiscCaps; /* Capability flags */
  1540. // DWORD RasterCaps;
  1541. // DWORD ZCmpCaps;
  1542. // DWORD SrcBlendCaps;
  1543. // DWORD DestBlendCaps;
  1544. // DWORD AlphaCmpCaps; DWORD ShadeCaps;
  1545. // DWORD TextureCaps;
  1546. // DWORD TextureFilterCaps;
  1547. // DWORD TextureBlendCaps;
  1548. // DWORD TextureAddressCaps;
  1549. // DWORD StippleWidth; /* maximum width and height of */
  1550. // DWORD StippleHeight; /* of supported stipple (up to 32x32) */
  1551. //} D3DPRIMCAPS8_CDESC;
  1552. [helpcontext(83205)]
  1553. typedef struct D3DCAPS8_CDESC {
  1554. /* Caps from DX7 Draw */
  1555. DWORD DeviceType;
  1556. UINT AdapterOrdinal;
  1557. DWORD Caps;
  1558. DWORD Caps2;
  1559. DWORD Caps3;
  1560. DWORD PresentationIntervals;
  1561. /* Cursor Caps */
  1562. DWORD CursorCaps;
  1563. /* 3D Device Caps */
  1564. DWORD DevCaps;
  1565. DWORD PrimitiveMiscCaps; /* Capability flags */
  1566. DWORD RasterCaps;
  1567. DWORD ZCmpCaps;
  1568. DWORD SrcBlendCaps;
  1569. DWORD DestBlendCaps;
  1570. DWORD AlphaCmpCaps;
  1571. DWORD ShadeCaps;
  1572. DWORD TextureCaps;
  1573. DWORD TextureFilterCaps;
  1574. DWORD CubeTextureFilterCaps;
  1575. DWORD VolumeTextureFilterCaps;
  1576. DWORD TextureAddressCaps;
  1577. DWORD VolumeTextureAddressCaps;
  1578. DWORD LineCaps;
  1579. DWORD MaxTextureWidth, MaxTextureHeight;
  1580. DWORD MaxVolumeExtent;
  1581. DWORD MaxTextureRepeat;
  1582. DWORD MaxTextureAspectRatio;
  1583. DWORD MaxAnisotropy;
  1584. FLOAT MaxVertexW;
  1585. FLOAT GuardBandLeft;
  1586. FLOAT GuardBandTop;
  1587. FLOAT GuardBandRight;
  1588. FLOAT GuardBandBottom;
  1589. FLOAT ExtentsAdjust;
  1590. DWORD StencilCaps;
  1591. DWORD FVFCaps;
  1592. DWORD TextureOpCaps;
  1593. DWORD MaxTextureBlendStages;
  1594. DWORD MaxSimultaneousTextures;
  1595. DWORD VertexProcessingCaps;
  1596. DWORD MaxActiveLights;
  1597. DWORD MaxUserClipPlanes;
  1598. DWORD MaxVertexBlendMatrices;
  1599. DWORD MaxVertexBlendMatrixIndex;
  1600. FLOAT MaxPointSize;
  1601. DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call
  1602. DWORD MaxVertexIndex;
  1603. DWORD MaxStreams;
  1604. DWORD MaxStreamStride; // max stride for SetStreamSource
  1605. DWORD VertexShaderVersion;
  1606. DWORD MaxVertexShaderConst; // number of vertex shader constant registers
  1607. DWORD PixelShaderVersion;
  1608. FLOAT MaxPixelShaderValue; // max value of pixel shader arithmetic component
  1609. } D3DCAPS8_CDESC;
  1610. // Removed from CORE
  1611. //
  1612. // [helpcontext(83209)]
  1613. //typedef struct D3DDEVICEINFO_TEXTURE_MANAGER_CDESC {
  1614. // BOOL bThrashing; /* indicates if thrashing */
  1615. // DWORD ApproxBytesDownloaded; /* Approximate number of bytes downloaded by texture manager */
  1616. // DWORD NumEvicts; /* number of textures evicted */
  1617. // DWORD NumVidCreates; /* number of textures created in video memory */
  1618. // DWORD NumTexturesUsed; /* number of textures used */
  1619. // DWORD NumUsedTexInVid; /* number of used textures present in video memory */
  1620. // DWORD WorkingSet; /* number of textures in video memory */
  1621. // DWORD WorkingSetBytes; /* number of bytes in video memory */
  1622. // DWORD TotalManaged; /* total number of managed textures */
  1623. // DWORD TotalBytes; /* total number of bytes of managed textures */
  1624. // DWORD LastPri; /* priority of last texture evicted */
  1625. //} D3DDEVICEINFO_TEXTURE_MANAGER_CDESC;
  1626. //
  1627. // [helpcontext(83819)]
  1628. //typedef struct D3DDEVICEINFO_TEXTURING_CDESC {
  1629. // DWORD NumLoads; /* counts Load() API calls */
  1630. // DWORD ApproxBytesLoaded; /* Approximate number bytes loaded via Load() */
  1631. // DWORD NumPreLoads; /* counts PreLoad() API calls */
  1632. // DWORD NumSet; /* counts SetTexture() API calls */
  1633. // DWORD NumCreates; /* counts texture creates */
  1634. // DWORD NumDestroys; /* counts texture destroys */
  1635. // DWORD NumSetPriorities; /* counts SetPriority() API calls */
  1636. // DWORD NumSetLODs; /* counts SetLOD() API calls */
  1637. // DWORD NumLocks; /* counts number of texture locks */
  1638. // DWORD NumGetDCs; /* counts number of GetDCs to textures */
  1639. //} D3DDEVICEINFO_TEXTURING_CDESC;
  1640. /************************************** OBJECTS ***********************************************/
  1641. //UPDATED 3/28/99
  1642. [
  1643. object,
  1644. uuid(1DD9E8DA-1C77-4d40-B0CF-98FEFDFF9512),
  1645. pointer_default(unique),
  1646. helpcontext(83027),
  1647. local
  1648. ]
  1649. interface IDirect3D8 : IUnknown
  1650. {
  1651. /*** IDirect3D8 methods ***/
  1652. [helpcontext(83040)] HRESULT RegisterSoftwareDevice([in] void *InitializeFunction);
  1653. [helpcontext(83034)] UINT GetAdapterCount();
  1654. [helpcontext(83036)] HRESULT GetAdapterIdentifier([in]UINT Adapter, [in]DWORD Flags, [in,out] D3DADAPTER_IDENTIFIER8 *Identifier);
  1655. [helpcontext(83037)] UINT GetAdapterModeCount([in]UINT Adapter) ;
  1656. [helpcontext(83033)] HRESULT EnumAdapterModes ([in] UINT Adapter, [in] UINT Mode, [in,out] D3DDISPLAYMODE* DisplayMode);
  1657. [helpcontext(83035)] HRESULT GetAdapterDisplayMode([in] UINT Adapter, [in,out] D3DDISPLAYMODE* DisplayMode);
  1658. [helpcontext(83031)] LONG CheckDeviceType ([in] UINT Adapter,[in] CONST_D3DDEVTYPE CheckType,[in] CONST_D3DFORMAT DisplayFormat,[in] CONST_D3DFORMAT BackBufferFormat,[in] LONG bWindowed);
  1659. [helpcontext(83029)] LONG CheckDeviceFormat ([in] UINT Adapter,[in] CONST_D3DDEVTYPE DeviceType, [in] CONST_D3DFORMAT AdapterFormat,[in] DWORD Usage,[in] CONST_D3DRESOURCETYPE RType, [in] CONST_D3DFORMAT CheckFormat);
  1660. [helpcontext(83030)] LONG CheckDeviceMultiSampleType ([in] UINT Adapter,[in] CONST_D3DDEVTYPE DeviceType,[in] CONST_D3DFORMAT RenderTargetFormat,[in] BOOL Windowed,[in] CONST_D3DMULTISAMPLE_TYPE MultiSampleType);
  1661. [helpcontext(83028)] LONG CheckDepthStencilMatch ([in] UINT Adapter,[in] CONST_D3DDEVTYPE DeviceType, [in] CONST_D3DFORMAT AdapterFormat,[in] CONST_D3DFORMAT RenderTargetFormat,[in] CONST_D3DFORMAT DepthStencilFormat);
  1662. [helpcontext(83039)] HRESULT GetDeviceCaps ([in] UINT Adapter,[in] CONST_D3DDEVTYPE DeviceType,[in,out] D3DCAPS8 *Caps) ;
  1663. [helpcontext(83038)] LONG GetAdapterMonitor ([in] UINT Adapter) ;
  1664. [helpcontext(83051)] HRESULT CreateDevice ([in] UINT Adapter,[in] CONST_D3DDEVTYPE DeviceType,[in] HWND hFocusWindow,[in] CONST_D3DCREATEFLAGS BehaviorFlags,[in] D3DPRESENT_PARAMETERS *PresentationParameters,[out,retval] IDirect3DDevice8 **ppReturnedDeviceInterface);
  1665. };
  1666. [
  1667. object,
  1668. uuid(7385E5DF-8FE8-41D5-86B6-D7B48547B6CF),
  1669. pointer_default(unique),
  1670. helpcontext(83450),
  1671. local
  1672. ]
  1673. interface IDirect3DDevice8 : IUnknown
  1674. {
  1675. /*** IDirect3DDevice8 methods ***/
  1676. [helpcontext(83142)] LONG TestCooperativeLevel() ;
  1677. [helpcontext(83082)] UINT GetAvailableTextureMem([in] CONST_D3DPOOL Pool) ;
  1678. [helpcontext(83119)] HRESULT ResourceManagerDiscardBytes([in] DWORD NumberOfBytes) ;
  1679. [helpcontext(83090)] HRESULT GetDirect3D([out,retval] LPDIRECT3D8 *pD3D8) ;
  1680. [helpcontext(83089)] HRESULT GetDeviceCaps([out] D3DCAPS8_CDESC *Caps) ;
  1681. [helpcontext(83091)] HRESULT GetDisplayMode([out] D3DDISPLAYMODE_CDESC *pMode) ;
  1682. [helpcontext(83208)] HRESULT GetCreationParameters([out] D3DDEVICE_CREATION_PARAMETERS *pCreationParams);
  1683. [helpcontext(83158)] HRESULT SetCursorProperties([in] UINT xHotSpot,[in] UINT yHotSpot,[in] IDirect3DSurface8 *CursorSurface) ;
  1684. [helpcontext(83123)] void SetCursorPosition([in] UINT xScreenSpace,[in] UINT yScreenSpace, [in] CONST_D3DSCPFLAGS flags) ;
  1685. [helpcontext(83141)] BOOL ShowCursor([in] BOOL bShow);
  1686. [helpcontext(83167)] HRESULT CreateAdditionalSwapChain([in] D3DPRESENT_PARAMETERS_CDESC *PresentationParameters,[out,retval] IDirect3DSwapChain8 **ppSwapChain) ;
  1687. [helpcontext(83118)] HRESULT Reset([in] D3DPRESENT_PARAMETERS_CDESC *PresentationParameters) ;
  1688. [helpcontext(83116)] HRESULT Present([in] void *pSourceRect,[in] void *pDestRect,[in] LONG hWndDestWindowOverride,[in] void *pDirtyRegion) ;
  1689. [helpcontext(83083)] HRESULT GetBackBuffer([in] LONG BackBuffer,[in] CONST_D3DBACKBUFFERTYPE BufferType, [out,retval] IDirect3DSurface8 **ppBackBuffer);
  1690. [helpcontext(83102)] D3DRASTER_STATUS_CDESC GetRasterStatus();
  1691. [helpcontext(83125)] void SetGammaRamp([in] DWORD dwFlags,[in] D3DGAMMARAMP_CDESC *pRamp) ;
  1692. [helpcontext(83092)] void GetGammaRamp([in,out] D3DGAMMARAMP_CDESC *pRamp) ;
  1693. [helpcontext(83170)] HRESULT CreateTexture([in] UINT Width,[in] UINT Height, [in] UINT Levels,[in] DWORD Usage,[in] CONST_D3DFORMAT Format,[in] CONST_D3DPOOL Pool,[out,retval] IDirect3DTexture8 **ppMipMap) ;
  1694. [helpcontext(83189)] HRESULT CreateVolumeTexture([in] UINT Width,[in] UINT Height,[in] UINT Depth,[in] UINT Levels,[in] DWORD Usage,[in] CONST_D3DFORMAT Format,[in] CONST_D3DPOOL Pool,[out,retval] IDirect3DVolumeTexture8 **ppMipMap) ;
  1695. [helpcontext(83059)] HRESULT CreateCubeTexture([in] UINT EdgeLength,[in] UINT Levels,[in] DWORD Usage,[in] CONST_D3DFORMAT Format,[in] CONST_D3DPOOL Pool,[out,retval] IDirect3DCubeTexture8 **ppCubeMap) ;
  1696. [helpcontext(83176)] HRESULT CreateVertexBuffer([in] UINT LengthInBytes,[in] DWORD Usage,[in] DWORD FVF, [in] CONST_D3DPOOL Pool,[out,retval] IDirect3DVertexBuffer8 **ppVertexBuffer) ;
  1697. [helpcontext(83145)] HRESULT CreateIndexBuffer([in] UINT LengthInBytes,[in] DWORD Usage,[in] CONST_D3DFORMAT Format,[in] CONST_D3DPOOL Pool,[out,retval] IDirect3DIndexBuffer8 **ppIndexBuffer) ;
  1698. [helpcontext(83064)] HRESULT CreateRenderTarget([in] UINT Width,[in] UINT Height,[in] CONST_D3DFORMAT Format,[in] CONST_D3DMULTISAMPLE_TYPE MultiSample,[in] LONG Lockable,[out,retval] IDirect3DSurface8 **ppSurface) ;
  1699. [helpcontext(83060)] HRESULT CreateDepthStencilSurface([in] UINT Width,[in] UINT Height,[in] CONST_D3DFORMAT Format,[in] CONST_D3DMULTISAMPLE_TYPE MultiSample, [out,retval] IDirect3DSurface8 **ppSurface) ;
  1700. [helpcontext(83061)] HRESULT CreateImageSurface([in] UINT Width,[in] UINT Height,[in] CONST_D3DFORMAT Format,[out,retval] IDirect3DSurface8 **ppSurface) ;
  1701. [helpcontext(83057)] HRESULT CopyRects([in] IDirect3DSurface8 *SourceSurface,[in] void *FirstElementOfSourceRectsArray,[in] UINT NumberOfRects,[in] IDirect3DSurface8 *DestinationSurface,[in] void *FirstElementofDestPointArray) ;
  1702. [helpcontext(83143)] HRESULT UpdateTexture([in] IDirect3DBaseTexture8 *SourceTexture,IDirect3DBaseTexture8 pDestinationTexture);
  1703. [helpcontext(83892)] HRESULT GetFrontBuffer([in] IDirect3DSurface8 *pDestSurface);
  1704. [helpcontext(83133)] HRESULT SetRenderTarget([in] IDirect3DSurface8 *RenderTarget,[in] IDirect3DSurface8 *NewZStencil,[in] DWORD Flags) ;
  1705. [helpcontext(83104)] HRESULT GetRenderTarget([out,retval] IDirect3DSurface8 **ppRenderTarget) ;
  1706. [helpcontext(83088)] HRESULT GetDepthStencilSurface([out,retval] IDirect3DSurface8 **ZStencilSurface);
  1707. [helpcontext(83053)] HRESULT BeginScene() ;
  1708. [helpcontext(83080)] HRESULT EndScene() ;
  1709. [helpcontext(83056)] HRESULT Clear([in] DWORD ClearRectCount,[in] void *clearD3DRect,[in] CONST_D3DCLEARFLAGS flags,[in] D3DCOLOR color,[in] FLOAT z,[in] DWORD stencil) ;
  1710. [helpcontext(83137)] HRESULT SetTransform([in] CONST_D3DTRANSFORMSTATETYPE transformType,[in] LPD3DMATRIX matrix) ;
  1711. [helpcontext(83108)] HRESULT GetTransform([in] CONST_D3DTRANSFORMSTATETYPE transformType,[out] LPD3DMATRIX matrix) ;
  1712. [helpcontext(83115)] HRESULT MultiplyTransform([in] CONST_D3DTRANSFORMSTATETYPE transformType,[in] LPD3DMATRIX matrix) ;
  1713. [helpcontext(83140)] HRESULT SetViewport([in] LPD3DVIEWPORT8 viewport) ;
  1714. [helpcontext(83113)] HRESULT GetViewport([out] LPD3DVIEWPORT8 viewport) ;
  1715. [helpcontext(83128)] HRESULT SetMaterial([in] LPD3DMATERIAL8 material) ;
  1716. [helpcontext(83097)] HRESULT GetMaterial([out] LPD3DMATERIAL8 material) ;
  1717. [helpcontext(83127)] HRESULT SetLight([in] DWORD index,[in] LPD3DLIGHT8 light) ;
  1718. [helpcontext(83095)] HRESULT GetLight([in] DWORD index,[out] LPD3DLIGHT8 light) ;
  1719. [helpcontext(83114)] HRESULT LightEnable([in] DWORD index,[in] BOOL enabled) ;
  1720. [helpcontext(83096)] HRESULT GetLightEnable([in] DWORD index,[out,retval] BOOL* enabled) ;
  1721. [helpcontext(83120)] HRESULT SetClipPlane([in] DWORD index, [in] D3DPLANE_CDESC * plane) ;
  1722. [helpcontext(83084)] HRESULT GetClipPlane([in] DWORD index,[out] D3DPLANE_CDESC * plane) ;
  1723. [helpcontext(83132)] HRESULT SetRenderState([in] CONST_D3DRENDERSTATETYPE stateType,[in] DWORD value) ;
  1724. [helpcontext(83103)] HRESULT GetRenderState([in] CONST_D3DRENDERSTATETYPE stateType,[out,retval] LPDWORD value) ;
  1725. [helpcontext(83054)] HRESULT BeginStateBlock() ;
  1726. [helpcontext(83081)] HRESULT EndStateBlock([out,retval] LPDWORD blockid) ;
  1727. [helpcontext(83052)] HRESULT ApplyStateBlock([in] DWORD blockid) ;
  1728. [helpcontext(83055)] HRESULT CaptureStateBlock([in] DWORD blockid) ;
  1729. [helpcontext(83072)] HRESULT DeleteStateBlock([in] DWORD blockid) ;
  1730. [helpcontext(83165)] HRESULT CreateStateBlock([in] CONST_D3DSTATEBLOCKTYPE blocktype,[out,retval] DWORD *blockid) ;
  1731. [helpcontext(83121)] HRESULT SetClipStatus([in] LPD3DCLIPSTATUS8 clipstatus) ;
  1732. [helpcontext(83085)] HRESULT GetClipStatus([out] LPD3DCLIPSTATUS8 clipstatus) ;
  1733. [helpcontext(83106)] HRESULT GetTexture([in] DWORD stage,[out,retval] LPDIRECT3DBASETEXTURE8 *texture) ;
  1734. [helpcontext(83135)] HRESULT SetTexture([in] DWORD stage,[in] LPDIRECT3DBASETEXTURE8 texture) ;
  1735. [helpcontext(83107)] HRESULT GetTextureStageState([in] DWORD stage,[in] CONST_D3DTEXTURESTAGESTATETYPE stateType,[out,retval] LPDWORD state) ;
  1736. [helpcontext(83136)] HRESULT SetTextureStageState([in] DWORD stage,[in] CONST_D3DTEXTURESTAGESTATETYPE stateType,[in] DWORD state) ;
  1737. [helpcontext(83144)] HRESULT ValidateDevice([out,retval] LPDWORD ret) ;
  1738. //GetInfo([in] DWORD flags,[in,out] LPVOID info,[in] DWORD size) ;
  1739. [helpcontext(83094)] HRESULT GetInfo([in] DWORD flags,[in,out] LPVOID info,[in] DWORD size) ;
  1740. //BUGBUG verify that we really want to pass in an array of dwords
  1741. [helpcontext(83129)] HRESULT SetPaletteEntries([in] UINT PaletteNumber,[in] void * ArrayOfEntries) ;
  1742. [helpcontext(83098)] HRESULT GetPaletteEntries([in] UINT PaletteNumber,[in,out] void * ArrayOfEntries) ;
  1743. [helpcontext(83122)] HRESULT SetCurrentTexturePalette([in] UINT PaletteNumber);
  1744. [helpcontext(83087)] HRESULT GetCurrentTexturePalette([out,retval] UINT *PaletteNumber);
  1745. [helpcontext(83076)] HRESULT DrawPrimitive([in] CONST_D3DPRIMITIVETYPE PrimitiveType,[in] UINT StartVertex,[in] UINT PrimitiveCount) ;
  1746. [helpcontext(83074)] HRESULT DrawIndexedPrimitive([in] CONST_D3DPRIMITIVETYPE PrimitiveType,[in] UINT minIndex,[in] UINT NumIndices,[in] UINT startIndex,[in] UINT primitiveCount) ;
  1747. [helpcontext(83077)] HRESULT DrawPrimitiveUP([in] CONST_D3DPRIMITIVETYPE PrimitiveType,[in] UINT PrimitiveCount,[in] void *VertexStreamZeroDataArray ,[in] UINT VertexStreamZeroStride) ;
  1748. [helpcontext(83075)] HRESULT DrawIndexedPrimitiveUP([in] CONST_D3DPRIMITIVETYPE PrimitiveType,[in] UINT minVertexIndex,
  1749. [in] UINT NumVertexIndices,
  1750. [in] UINT PrimitiveCount,[in] void *IndexDataArray ,
  1751. [in] CONST_D3DFORMAT IndexDataFormat, [in] void *VertexStreamZeroDataArray ,
  1752. [in] UINT VertexStreamZeroStride) ;
  1753. [helpcontext(83117)] HRESULT ProcessVertices( [in] UINT SrcStartIndex,[in] UINT DestIndex,[in] UINT VertexCount,[in] LPD3DVERTEXBUFFER8 DestBuffer,[in] DWORD Flags) ;
  1754. //TALK TO D3D about reversing params
  1755. [helpcontext(83868)] HRESULT CreateVertexShader([in] LPDWORD DeclarationTokenArray,[in,out] void *FunctionTokenArray,[in,out] LPDWORD retHandle,[in] DWORD usage) ;
  1756. [helpcontext(83138)] HRESULT SetVertexShader([in] DWORD VertexShaderHandle) ;
  1757. [helpcontext(83109)] HRESULT GetVertexShader([out,retval] LPDWORD pdwHandle) ;
  1758. [helpcontext(83073)] HRESULT DeleteVertexShader([in] DWORD VertexShaderHandle) ;
  1759. [helpcontext(83139)] HRESULT SetVertexShaderConstant( [in] DWORD Register,[in] LPVOID pConstantData,[in] DWORD ConstantCount) ;
  1760. [helpcontext(83110)] HRESULT GetVertexShaderConstant( [in] DWORD Register,[in,out] LPVOID pConstantData,[in] DWORD ConstantCount) ;
  1761. [helpcontext(83111)] HRESULT GetVertexShaderDeclaration([in] DWORD Handle,[in] void *Data,[in,out] DWORD *SizeOfData);
  1762. [helpcontext(83112)] HRESULT GetVertexShaderFunction([in] DWORD Handle,[in] void *pData,[in,out] DWORD *SizeOfData);
  1763. [helpcontext(83134)] HRESULT SetStreamSource([in] UINT StreamNumber,[in] LPD3DVERTEXBUFFER8 StreamData,[in] UINT Stride) ;
  1764. [helpcontext(83105)] HRESULT GetStreamSource([in] UINT StreamNumber, [in,out] LPD3DVERTEXBUFFER8 *RetStreamData,[in,out]UINT *RetStride) ;
  1765. [helpcontext(83126)] HRESULT SetIndices ([in] LPD3DINDEXBUFFER8 IndexData,[in] UINT BaseVertexIndex) ;
  1766. [helpcontext(83093)] HRESULT GetIndices ([out] LPD3DINDEXBUFFER8 *RetIndexData,[out] UINT *RetBaseVertexIndex);
  1767. [helpcontext(83063)] HRESULT CreatePixelShader([in] LPDWORD FunctionTokenArray,[out,retval]DWORD* pdwHandle) ;
  1768. [helpcontext(83130)] HRESULT SetPixelShader([in] DWORD PixelShaderHandle) ;
  1769. [helpcontext(83099)] HRESULT GetPixelShader([out,retval] DWORD* pdwHandle);
  1770. [helpcontext(83171)] HRESULT DeletePixelShader([in] DWORD PixelShaderHandle);
  1771. [helpcontext(83131)] HRESULT SetPixelShaderConstant([in] DWORD Register,[in] VOID* pConstantData,[in] DWORD ConstantCount);
  1772. [helpcontext(83100)] HRESULT GetPixelShaderConstant([in] DWORD Register,[in,out] VOID* pConstantData,[in] DWORD ConstantCount);
  1773. [helpcontext(83101)] HRESULT GetPixelShaderFunction([in] DWORD Handle,[in] void *pData,[in,out] DWORD *SizeOfData);
  1774. [helpcontext(83078)] HRESULT DrawRectPatch([in] LONG Handle,[in,out] FLOAT *NumSegments,void *surf);
  1775. [helpcontext(83079)] HRESULT DrawTriPatch([in] LONG Handle,[in,out] FLOAT *NumSegments,void *surf);
  1776. [helpcontext(83870)] HRESULT DeletePatch([in] LONG Handle);
  1777. };
  1778. [
  1779. object,
  1780. uuid(928C088B-76B9-4C6B-A536-A590853876CD),
  1781. pointer_default(unique),
  1782. helpcontext(83967),
  1783. local
  1784. ]
  1785. interface IDirect3DSwapChain8 : IUnknown
  1786. {
  1787. /*** ID3DSwapChain8 methods ***/
  1788. [helpcontext(83169)] HRESULT Present([in] void *SourceRect,[in] void *DestRect,[in] HWND hDestWindowOverride, [in] void *DirtyRegion) ;
  1789. [helpcontext(83168)] HRESULT GetBackBuffer([in] UINT BackBuffer,[in] CONST_D3DBACKBUFFERTYPE BufferType, [out,retval] IDirect3DSurface8 **ppBackBuffer) ;
  1790. };
  1791. [
  1792. object,
  1793. uuid(1B36BB7B-09B7-410a-B445-7D1430D7B33F),
  1794. pointer_default(unique),
  1795. helpcontext(83149),
  1796. local
  1797. ]
  1798. interface IDirect3DResource8 : IUnknown
  1799. {
  1800. /*** IDirect3DResource8 methods ***/
  1801. [helpcontext(83151)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1802. [helpcontext(83157)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1803. [helpcontext(83153)] HRESULT GetPrivateData( [in] REFGUID refguid,[in] void *Data,[in,out] DWORD *SizeOfData) ;
  1804. [helpcontext(83150)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1805. [helpcontext(83156)] DWORD SetPriority([in] DWORD PriorityNew) ;
  1806. [helpcontext(83152)] DWORD GetPriority() ;
  1807. [helpcontext(83155)] void PreLoad();
  1808. [helpcontext(83154)] CONST_D3DRESOURCETYPE GetType();
  1809. };
  1810. [
  1811. object,
  1812. uuid(B4211CFA-51B9-4a9f-AB78-DB99B2BB678E),
  1813. pointer_default(unique),
  1814. helpcontext(83540),
  1815. local
  1816. ]
  1817. interface IDirect3DBaseTexture8 : IUnknown
  1818. {
  1819. [helpcontext(89044)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1820. [helpcontext(89045)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1821. [helpcontext(89046)] HRESULT GetPrivateData( [in] REFGUID refguid,[in] void *Data,[in,out] DWORD *SizeOfData) ;
  1822. [helpcontext(89047)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1823. [helpcontext(89048)] DWORD SetPriority([in] DWORD PriorityNew) ;
  1824. [helpcontext(89049)] DWORD GetPriority() ;
  1825. [helpcontext(89050)] void PreLoad();
  1826. [helpcontext(89051)] CONST_D3DRESOURCETYPE GetType();
  1827. [helpcontext(83044)] DWORD SetLOD([in] DWORD LODNew) ;
  1828. [helpcontext(83043)] DWORD GetLOD() ;
  1829. [helpcontext(83042)] DWORD GetLevelCount() ;
  1830. };
  1831. [
  1832. object,
  1833. uuid(E4CDD575-2866-4f01-B12E-7EECE1EC9358),
  1834. pointer_default(unique),
  1835. helpcontext(83970),
  1836. local
  1837. ]
  1838. interface IDirect3DTexture8 : IUnknown
  1839. {
  1840. [helpcontext(89052)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1841. [helpcontext(89053)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1842. [helpcontext(89054)] HRESULT GetPrivateData( [in] REFGUID refguid,[in] void *Data,[in,out] DWORD *SizeOfData) ;
  1843. [helpcontext(89055)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1844. [helpcontext(89056)] DWORD SetPriority([in] DWORD PriorityNew) ;
  1845. [helpcontext(89057)] DWORD GetPriority() ;
  1846. [helpcontext(89058)] void PreLoad();
  1847. [helpcontext(89059)] CONST_D3DRESOURCETYPE GetType();
  1848. [helpcontext(89060)] DWORD SetLOD([in] DWORD dwLODNew) ;
  1849. [helpcontext(89061)] DWORD GetLOD() ;
  1850. [helpcontext(89062)] DWORD GetLevelCount() ;
  1851. [helpcontext(83172)] HRESULT GetLevelDesc([in] UINT Level, [out] D3DSURFACE_DESC_CDESC *pDesc) ;
  1852. [helpcontext(83173)] HRESULT GetSurfaceLevel([in] UINT Level,[out,retval] IDirect3DSurface8 **ppSurfaceLevel) ;
  1853. [helpcontext(83174)] HRESULT LockRect([in] UINT Level,[in] D3DLOCKED_RECT_CDESC *LockedRect,[in] void *Rect, [in] DWORD Flags) ;
  1854. [helpcontext(83175)] HRESULT UnlockRect([in] UINT Level) ;
  1855. [helpcontext(83671)] HRESULT AddDirtyRect([in] void *DirtyRect) ;
  1856. };
  1857. [
  1858. object,
  1859. uuid(4B8AAAFA-140F-42ba-9131-597EAFAA2EAD),
  1860. pointer_default(unique),
  1861. helpcontext(83789),
  1862. local
  1863. ]
  1864. interface IDirect3DVolumeTexture8 : IUnknown
  1865. {
  1866. [helpcontext(83183)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1867. [helpcontext(83187)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1868. [helpcontext(83184)] HRESULT GetPrivateData( [in] REFGUID refguid,[in] void *Data,[in,out] DWORD *SizeOfData) ;
  1869. [helpcontext(83181)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1870. [helpcontext(89063)] DWORD SetPriority([in] DWORD PriorityNew) ;
  1871. [helpcontext(89064)] DWORD GetPriority() ;
  1872. [helpcontext(89065)] void PreLoad();
  1873. [helpcontext(89066)] CONST_D3DRESOURCETYPE GetType();
  1874. [helpcontext(89067)] DWORD SetLOD([in] DWORD dwLODNew) ;
  1875. [helpcontext(89068)] DWORD GetLOD() ;
  1876. [helpcontext(89069)] DWORD GetLevelCount() ;
  1877. [helpcontext(83191)] HRESULT GetLevelDesc([in] UINT Level, [out] D3DVOLUME_DESC_CDESC *pDesc);
  1878. [helpcontext(83192)] HRESULT GetVolumeLevel([in] UINT Level,[out,retval] IDirect3DVolume8 **ppVolumeLevel) ;
  1879. // [helpcontext(63193)] HRESULT LockBox([in] UINT iLevel,[in] D3DLOCKED_BOX_CDESC *pLockedVolume,[in,out] D3DBOX_CDESC *Box,[in] DWORD Flags) ;
  1880. [helpcontext(83193)] HRESULT LockBox([in] UINT iLevel,[in] D3DLOCKED_BOX_CDESC *pLockedVolume,[in,out] void *Box,[in] DWORD Flags) ;
  1881. [helpcontext(83194)] HRESULT UnlockBox([in] UINT Level) ;
  1882. [helpcontext(83190)] HRESULT AddDirtyBox([in] D3DBOX_CDESC *DirtyBox) ;
  1883. };
  1884. [
  1885. object,
  1886. uuid(3EE5B968-2ACA-4c34-8BB5-7E0C3D19B750),
  1887. pointer_default(unique),
  1888. helpcontext(89200),
  1889. local
  1890. ]
  1891. interface IDirect3DCubeTexture8 : IUnknown
  1892. {
  1893. [helpcontext(89105)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1894. [helpcontext(89070)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1895. [helpcontext(89071)] HRESULT GetPrivateData( [in] REFGUID refguid,[in] void *Data,[in,out] DWORD *SizeOfData) ;
  1896. [helpcontext(89072)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1897. [helpcontext(89073)] DWORD SetPriority([in] DWORD PriorityNew) ;
  1898. [helpcontext(89074)] DWORD GetPriority() ;
  1899. [helpcontext(89075)] void PreLoad();
  1900. [helpcontext(89076)] CONST_D3DRESOURCETYPE GetType();
  1901. [helpcontext(89077)] DWORD SetLOD([in] DWORD dwLODNew) ;
  1902. [helpcontext(89078)] DWORD GetLOD() ;
  1903. [helpcontext(89079)] DWORD GetLevelCount() ;
  1904. [helpcontext(83048)] HRESULT GetLevelDesc([in] UINT Level, [out] D3DSURFACE_DESC_CDESC *pDesc) ;
  1905. [helpcontext(83047)] HRESULT GetCubeMapSurface([in] CONST_D3DCUBEMAP_FACES FaceType,[in] UINT Level,[out,retval] IDirect3DSurface8 **ppCubeMapSurface) ;
  1906. [helpcontext(83049)] HRESULT LockRect([in] CONST_D3DCUBEMAP_FACES FaceType, [in] UINT Level,[in] D3DLOCKED_RECT_CDESC *LockedRect,[in] void *Rect, [in] DWORD Flags) ;
  1907. [helpcontext(83050)] HRESULT UnlockRect([in] CONST_D3DCUBEMAP_FACES FaceType, [in] UINT iLevel) ;
  1908. [helpcontext(83046)] HRESULT AddDirtyRect([in] CONST_D3DCUBEMAP_FACES FaceType, [in] void *DirtyRect) ;
  1909. };
  1910. [
  1911. object,
  1912. uuid(8AEEEAC7-05F9-44d4-B591-000B0DF1CB95),
  1913. pointer_default(unique),
  1914. helpcontext(89201),
  1915. local
  1916. ]
  1917. interface IDirect3DVertexBuffer8 : IUnknown
  1918. {
  1919. [helpcontext(89080)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1920. [helpcontext(89081)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1921. [helpcontext(89082)] HRESULT GetPrivateData( [in] REFGUID refguid,[in] void *Data,[in,out] DWORD *SizeOfData) ;
  1922. [helpcontext(89083)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1923. [helpcontext(89084)] DWORD SetPriority([in] DWORD PriorityNew) ;
  1924. [helpcontext(89085)] DWORD GetPriority() ;
  1925. [helpcontext(89086)] void PreLoad() ;
  1926. [helpcontext(89087)] CONST_D3DRESOURCETYPE GetType(THIS);
  1927. [helpcontext(83178)] HRESULT Lock([in] UINT ByteOffsetToLock,[in] UINT ByteSizeToLock,[out] LONG *pData,[in] DWORD Flags);
  1928. [helpcontext(83179)] HRESULT Unlock();
  1929. [helpcontext(83177)] HRESULT GetDesc([out] D3DVERTEXBUFFER_DESC_CDESC *pDesc);
  1930. };
  1931. [
  1932. object,
  1933. uuid(0E689C9A-053D-44a0-9D92-DB0E3D750F86),
  1934. pointer_default(unique),
  1935. helpcontext(83645),
  1936. local
  1937. ]
  1938. interface IDirect3DIndexBuffer8 : IUnknown
  1939. {
  1940. [helpcontext(89088)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1941. [helpcontext(89089)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1942. [helpcontext(89090)] HRESULT GetPrivateData( [in] REFGUID refguid,[in,out] void *Data,[in,out] DWORD *SizeOfDataa) ;
  1943. [helpcontext(89091)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1944. [helpcontext(89092)] DWORD SetPriority([in] DWORD PriorityNew) ;
  1945. [helpcontext(89093)] DWORD GetPriority() ;
  1946. [helpcontext(89094)] void PreLoad();
  1947. [helpcontext(89095)] CONST_D3DRESOURCETYPE GetType(THIS);
  1948. [helpcontext(83147)] HRESULT Lock([in] UINT cbOffsetToLock,[in] UINT cbSizeToLock,[out] LONG *pData,[in] DWORD Flags);
  1949. [helpcontext(83148)] HRESULT Unlock();
  1950. [helpcontext(83146)] HRESULT GetDesc([out] D3DINDEXBUFFER_DESC_CDESC *pDesc);
  1951. };
  1952. [
  1953. object,
  1954. uuid(B96EEBCA-B326-4ea5-882F-2FF5BAE021DD),
  1955. pointer_default(unique),
  1956. helpcontext(83958),
  1957. local
  1958. ]
  1959. interface IDirect3DSurface8 : IUnknown
  1960. {
  1961. [helpcontext(83162)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1962. [helpcontext(83665)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1963. [helpcontext(83163)] HRESULT GetPrivateData( [in] REFGUID refguid,[in,out] void *Data,[in,out] DWORD *SizeOfDataa) ;
  1964. [helpcontext(83159)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1965. [helpcontext(83160)] HRESULT GetContainer(DXGUID_CDESC *riid,[out,retval] IUnknown **ppContainer);
  1966. [helpcontext(83161)] HRESULT GetDesc([out] D3DSURFACE_DESC_CDESC *pDesc);
  1967. [helpcontext(83164)] HRESULT LockRect([in] D3DLOCKED_RECT_CDESC *LockedRect,[in] void *Rect, [in] DWORD Flags) ;
  1968. [helpcontext(83166)] HRESULT UnlockRect() ;
  1969. };
  1970. [
  1971. object,
  1972. uuid(BD7349F5-14F1-42e4-9C79-972380DB40C0),
  1973. pointer_default(unique),
  1974. helpcontext(83180),
  1975. local
  1976. ]
  1977. interface IDirect3DVolume8 : IUnknown
  1978. {
  1979. [helpcontext(89096)] HRESULT GetDevice( [out,retval] LPDIRECT3DDEVICE8 *ppDevice) ;
  1980. [helpcontext(89097)] HRESULT SetPrivateData( [in] REFGUID refguid,[in] void *Data,[in] DWORD SizeOfData,[in] DWORD Flags) ;
  1981. [helpcontext(89098)] HRESULT GetPrivateData( [in] REFGUID refguid,[in,out] void *Data,[in,out] DWORD *SizeOfDataa) ;
  1982. [helpcontext(89099)] HRESULT FreePrivateData( [in] REFGUID refguid) ;
  1983. [helpcontext(83182)] HRESULT GetContainer(DXGUID_CDESC *riid,[out,retval] IUnknown **ppContainer);
  1984. [helpcontext(83185)] HRESULT GetDesc([out] D3DVOLUME_DESC_CDESC *pDesc);
  1985. // [helpcontext(99044)] HRESULT LockBox([in] D3DLOCKED_BOX_CDESC *LockedVolume,[in,out] D3DBOX_CDESC *box, [in] DWORD Flags) ;
  1986. [helpcontext(89100)] HRESULT LockBox([in] D3DLOCKED_BOX_CDESC *LockedVolume,[in] void *box, [in] DWORD Flags) ;
  1987. [helpcontext(89101)] HRESULT UnlockBox();
  1988. };
  1989. [
  1990. dllname("dx8vb.dll")
  1991. ]
  1992. module D3DAUX
  1993. {
  1994. [entry(114) ,helpcontext(83202)] LONG _stdcall D3DVertexBuffer8SetData (IDirect3DVertexBuffer8 *VBuffer,int offset,int size,LONG flags, void *data);
  1995. [entry(115) ,helpcontext(83200)] LONG _stdcall D3DVertexBuffer8GetData (IDirect3DVertexBuffer8 *VBuffer,int offset,int size,LONG flags, void *data);
  1996. [entry(116) ,helpcontext(83201)] LONG _stdcall D3DIndexBuffer8SetData (IDirect3DIndexBuffer8 *IBuffer,int offset,int size,LONG flags, void *data);
  1997. [entry(117) ,helpcontext(83199)] LONG _stdcall D3DIndexBuffer8GetData (IDirect3DIndexBuffer8 *IBuffer,int offset,int size,LONG flags, void *data);
  1998. [entry(135) ,helpcontext(87080)] LONG _stdcall D3DXMeshVertexBuffer8SetData (IUnknown *d3dxmeshobj,int offset,int size,LONG flags, void *data);
  1999. [entry(136) ,helpcontext(87081)] LONG _stdcall D3DXMeshVertexBuffer8GetData (IUnknown *d3dxmeshobj,int offset,int size,LONG flags, void *data);
  2000. [entry(137) ,helpcontext(87082)] LONG _stdcall D3DXMeshIndexBuffer8SetData (IUnknown *d3dxmeshobj,int offset,int size,LONG flags, void *data);
  2001. [entry(138) ,helpcontext(87083)] LONG _stdcall D3DXMeshIndexBuffer8GetData (IUnknown *d3dxmeshobj,int offset,int size,LONG flags, void *data);
  2002. [entry(139) ,helpcontext(92123)] LONG _stdcall DXCopyMemory (void *dest, void *src, LONG size);
  2003. };
  2004. #endif
  2005. ///////////////////////////
  2006. //DEAD ENUMS ????
  2007. ///////////////////////////
  2008. #if 0
  2009. [helpcontext(89000)]
  2010. typedef enum CONST_D3DTEXTUREFILTER {
  2011. D3DFILTER_NEAREST = 1,
  2012. D3DFILTER_LINEAR = 2,
  2013. D3DFILTER_MIPNEAREST = 3,
  2014. D3DFILTER_MIPLINEAR = 4,
  2015. D3DFILTER_LINEARMIPNEAREST = 5,
  2016. D3DFILTER_LINEARMIPLINEAR = 6,
  2017. D3DFILTER_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  2018. } D3DTEXTUREFILTER;
  2019. [helpcontext(89001)]
  2020. typedef enum CONST_D3DTEXTUREBLEND {
  2021. D3DTBLEND_DECAL = 1,
  2022. D3DTBLEND_MODULATE = 2,
  2023. D3DTBLEND_DECALALPHA = 3,
  2024. D3DTBLEND_MODULATEALPHA = 4,
  2025. D3DTBLEND_DECALMASK = 5,
  2026. D3DTBLEND_MODULATEMASK = 6,
  2027. D3DTBLEND_COPY = 7,
  2028. D3DTBLEND_ADD = 8,
  2029. D3DTBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  2030. } D3DTEXTUREBLEND;
  2031. [helpcontext(89002)]
  2032. typedef enum CONST_D3DANTIALIASMODE {
  2033. D3DANTIALIAS_NONE = 0,
  2034. D3DANTIALIAS_SORTDEPENDENT = 1,
  2035. D3DANTIALIAS_SORTINDEPENDENT = 2,
  2036. D3DANTIALIAS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
  2037. } D3DANTIALIASMODE;
  2038. #endif