d3d.h 94 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569
  1. #undef INTERFACE
  2. /*
  3. * Copyright (C) the Wine project
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2.1 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  18. */
  19. #ifndef __WINE_D3D_H
  20. #define __WINE_D3D_H
  21. #include <stdlib.h>
  22. #define COM_NO_WINDOWS_H
  23. #include <objbase.h>
  24. #include <d3dtypes.h> /* must precede d3dcaps.h */
  25. #include <d3dcaps.h>
  26. /*****************************************************************************
  27. * Predeclare the interfaces
  28. */
  29. DEFINE_GUID(IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
  30. DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
  31. DEFINE_GUID(IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
  32. DEFINE_GUID(IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
  33. DEFINE_GUID(IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
  34. DEFINE_GUID(IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
  35. DEFINE_GUID(IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
  36. DEFINE_GUID(IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
  37. DEFINE_GUID(IID_IDirect3DRefDevice, 0x50936643,0x13e9,0x11d1,0x89,0xaa,0x00,0xa0,0xc9,0x05,0x41,0x29);
  38. DEFINE_GUID(IID_IDirect3DTnLHalDevice, 0xf5049e78,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
  39. DEFINE_GUID(IID_IDirect3DNullDevice, 0x8767df22,0xbacc,0x11d1,0x89,0x69,0x00,0xa0,0xc9,0x06,0x29,0xa8);
  40. DEFINE_GUID(IID_IDirect3DDevice, 0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
  41. DEFINE_GUID(IID_IDirect3DDevice2, 0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
  42. DEFINE_GUID(IID_IDirect3DDevice3, 0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
  43. DEFINE_GUID(IID_IDirect3DDevice7, 0xf5049e79,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
  44. DEFINE_GUID(IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
  45. DEFINE_GUID(IID_IDirect3DTexture2, 0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
  46. DEFINE_GUID(IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
  47. DEFINE_GUID(IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
  48. DEFINE_GUID(IID_IDirect3DMaterial2, 0x93281503,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
  49. DEFINE_GUID(IID_IDirect3DMaterial3, 0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x00,0x60,0x08,0x52,0xb3,0x12);
  50. DEFINE_GUID(IID_IDirect3DExecuteBuffer, 0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
  51. DEFINE_GUID(IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
  52. DEFINE_GUID(IID_IDirect3DViewport2, 0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
  53. DEFINE_GUID(IID_IDirect3DViewport3, 0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
  54. DEFINE_GUID(IID_IDirect3DVertexBuffer, 0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x00,0xa0,0xc9,0x03,0x67,0xf8);
  55. DEFINE_GUID(IID_IDirect3DVertexBuffer7, 0xf5049e7d,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
  56. typedef struct IDirect3D *LPDIRECT3D;
  57. typedef struct IDirect3D2 *LPDIRECT3D2;
  58. typedef struct IDirect3D3 *LPDIRECT3D3;
  59. typedef struct IDirect3D7 *LPDIRECT3D7;
  60. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  61. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  62. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  63. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  64. typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
  65. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  66. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  67. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  68. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  69. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  70. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  71. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  72. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  73. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  74. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  75. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  76. /* ********************************************************************
  77. Error Codes
  78. ******************************************************************** */
  79. #define D3D_OK DD_OK
  80. #define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
  81. #define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
  82. #define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
  83. #define D3DERR_INITFAILED MAKE_DDHRESULT(706)
  84. #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
  85. #define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
  86. #define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
  87. #define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
  88. #define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
  89. #define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
  90. #define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
  91. #define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
  92. #define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
  93. #define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
  94. #define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
  95. #define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
  96. #define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
  97. #define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
  98. #define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
  99. #define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
  100. #define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
  101. #define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
  102. #define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
  103. #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
  104. #define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
  105. #define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
  106. #define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
  107. #define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
  108. #define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
  109. #define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
  110. #define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
  111. #define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
  112. #define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
  113. #define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
  114. #define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
  115. #define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
  116. #define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
  117. #define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
  118. #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
  119. #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
  120. #define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
  121. #define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
  122. #define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
  123. #define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
  124. #define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
  125. #define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
  126. #define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
  127. #define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
  128. #define D3DERR_INBEGIN MAKE_DDHRESULT(770)
  129. #define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
  130. #define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
  131. #define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
  132. #define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
  133. #define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
  134. #define D3DERR_INVALIDVERTEXFORMAT MAKE_DDHRESULT(2048)
  135. #define D3DERR_COLORKEYATTACHED MAKE_DDHRESULT(2050)
  136. #define D3DERR_VERTEXBUFFEROPTIMIZED MAKE_DDHRESULT(2060)
  137. #define D3DERR_VBUF_CREATE_FAILED MAKE_DDHRESULT(2061)
  138. #define D3DERR_VERTEXBUFFERLOCKED MAKE_DDHRESULT(2062)
  139. #define D3DERR_VERTEXBUFFERUNLOCKFAILED MAKE_DDHRESULT(2063)
  140. #define D3DERR_ZBUFFER_NOTPRESENT MAKE_DDHRESULT(2070)
  141. #define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071)
  142. #define D3DERR_WRONGTEXTUREFORMAT MAKE_DDHRESULT(2072)
  143. #define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_DDHRESULT(2073)
  144. #define D3DERR_UNSUPPORTEDCOLORARG MAKE_DDHRESULT(2074)
  145. #define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_DDHRESULT(2075)
  146. #define D3DERR_UNSUPPORTEDALPHAARG MAKE_DDHRESULT(2076)
  147. #define D3DERR_TOOMANYOPERATIONS MAKE_DDHRESULT(2077)
  148. #define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_DDHRESULT(2078)
  149. #define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_DDHRESULT(2079)
  150. #define D3DERR_CONFLICTINGRENDERSTATE MAKE_DDHRESULT(2081)
  151. #define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_DDHRESULT(2082)
  152. #define D3DERR_TOOMANYPRIMITIVES MAKE_DDHRESULT(2083)
  153. #define D3DERR_INVALIDMATRIX MAKE_DDHRESULT(2084)
  154. #define D3DERR_TOOMANYVERTICES MAKE_DDHRESULT(2085)
  155. #define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_DDHRESULT(2086)
  156. #define D3DERR_INVALIDSTATEBLOCK MAKE_DDHRESULT(2100)
  157. #define D3DERR_INBEGINSTATEBLOCK MAKE_DDHRESULT(2101)
  158. #define D3DERR_NOTINBEGINSTATEBLOCK MAKE_DDHRESULT(2102)
  159. /* ********************************************************************
  160. Enums
  161. ******************************************************************** */
  162. #define D3DNEXT_NEXT __MSABI_LONG(0x01)
  163. #define D3DNEXT_HEAD __MSABI_LONG(0x02)
  164. #define D3DNEXT_TAIL __MSABI_LONG(0x04)
  165. #define D3DDP_WAIT __MSABI_LONG(0x00000001)
  166. #define D3DDP_OUTOFORDER __MSABI_LONG(0x00000002)
  167. #define D3DDP_DONOTCLIP __MSABI_LONG(0x00000004)
  168. #define D3DDP_DONOTUPDATEEXTENTS __MSABI_LONG(0x00000008)
  169. #define D3DDP_DONOTLIGHT __MSABI_LONG(0x00000010)
  170. /* ********************************************************************
  171. Types and structures
  172. ******************************************************************** */
  173. typedef DWORD D3DVIEWPORTHANDLE, *LPD3DVIEWPORTHANDLE;
  174. /*****************************************************************************
  175. * IDirect3D interface
  176. */
  177. #undef INTERFACE
  178. #define INTERFACE IDirect3D
  179. DECLARE_INTERFACE_(IDirect3D,IUnknown)
  180. {
  181. /*** IUnknown methods ***/
  182. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  183. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  184. STDMETHOD_(ULONG,Release)(THIS) PURE;
  185. /*** IDirect3D methods ***/
  186. STDMETHOD(Initialize)(THIS_ REFIID riid) PURE;
  187. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK cb, void *ctx) PURE;
  188. STDMETHOD(CreateLight)(THIS_ struct IDirect3DLight **light, IUnknown *outer) PURE;
  189. STDMETHOD(CreateMaterial)(THIS_ struct IDirect3DMaterial **material, IUnknown *outer) PURE;
  190. STDMETHOD(CreateViewport)(THIS_ struct IDirect3DViewport **viewport, IUnknown *outer) PURE;
  191. STDMETHOD(FindDevice)(THIS_ D3DFINDDEVICESEARCH *search, D3DFINDDEVICERESULT *result) PURE;
  192. };
  193. #undef INTERFACE
  194. #if !defined(__cplusplus) || defined(CINTERFACE)
  195. /*** IUnknown methods ***/
  196. #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  197. #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
  198. #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
  199. /*** IDirect3D methods ***/
  200. #define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  201. #define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  202. #define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  203. #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  204. #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  205. #define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  206. #else
  207. /*** IUnknown methods ***/
  208. #define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  209. #define IDirect3D_AddRef(p) (p)->AddRef()
  210. #define IDirect3D_Release(p) (p)->Release()
  211. /*** IDirect3D methods ***/
  212. #define IDirect3D_Initialize(p,a) (p)->Initialize(a)
  213. #define IDirect3D_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  214. #define IDirect3D_CreateLight(p,a,b) (p)->CreateLight(a,b)
  215. #define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  216. #define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  217. #define IDirect3D_FindDevice(p,a,b) (p)->FindDevice(a,b)
  218. #endif
  219. /*****************************************************************************
  220. * IDirect3D2 interface
  221. */
  222. #define INTERFACE IDirect3D2
  223. DECLARE_INTERFACE_(IDirect3D2,IUnknown)
  224. {
  225. /*** IUnknown methods ***/
  226. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  227. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  228. STDMETHOD_(ULONG,Release)(THIS) PURE;
  229. /*** IDirect3D2 methods ***/
  230. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK cb, void *ctx) PURE;
  231. STDMETHOD(CreateLight)(THIS_ struct IDirect3DLight **light, IUnknown *outer) PURE;
  232. STDMETHOD(CreateMaterial)(THIS_ struct IDirect3DMaterial2 **material, IUnknown *outer) PURE;
  233. STDMETHOD(CreateViewport)(THIS_ struct IDirect3DViewport2 **viewport, IUnknown *outer) PURE;
  234. STDMETHOD(FindDevice)(THIS_ D3DFINDDEVICESEARCH *search, D3DFINDDEVICERESULT *result) PURE;
  235. STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid, IDirectDrawSurface *surface,
  236. struct IDirect3DDevice2 **device) PURE;
  237. };
  238. #undef INTERFACE
  239. #if !defined(__cplusplus) || defined(CINTERFACE)
  240. /*** IUnknown methods ***/
  241. #define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  242. #define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
  243. #define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
  244. /*** IDirect3D2 methods ***/
  245. #define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  246. #define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  247. #define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  248. #define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  249. #define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  250. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  251. #else
  252. /*** IUnknown methods ***/
  253. #define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  254. #define IDirect3D2_AddRef(p) (p)->AddRef()
  255. #define IDirect3D2_Release(p) (p)->Release()
  256. /*** IDirect3D2 methods ***/
  257. #define IDirect3D2_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  258. #define IDirect3D2_CreateLight(p,a,b) (p)->CreateLight(a,b)
  259. #define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  260. #define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  261. #define IDirect3D2_FindDevice(p,a,b) (p)->FindDevice(a,b)
  262. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  263. #endif
  264. /*****************************************************************************
  265. * IDirect3D3 interface
  266. */
  267. #define INTERFACE IDirect3D3
  268. DECLARE_INTERFACE_(IDirect3D3,IUnknown)
  269. {
  270. /*** IUnknown methods ***/
  271. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  272. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  273. STDMETHOD_(ULONG,Release)(THIS) PURE;
  274. /*** IDirect3D3 methods ***/
  275. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK cb, void *ctx) PURE;
  276. STDMETHOD(CreateLight)(THIS_ struct IDirect3DLight **light, IUnknown *outer) PURE;
  277. STDMETHOD(CreateMaterial)(THIS_ struct IDirect3DMaterial3 **material, IUnknown *outer) PURE;
  278. STDMETHOD(CreateViewport)(THIS_ struct IDirect3DViewport3 **viewport, IUnknown *outer) PURE;
  279. STDMETHOD(FindDevice)(THIS_ D3DFINDDEVICESEARCH *search, D3DFINDDEVICERESULT *result) PURE;
  280. STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid, IDirectDrawSurface4 *surface,
  281. struct IDirect3DDevice3 **device, IUnknown *outer) PURE;
  282. STDMETHOD(CreateVertexBuffer)(THIS_ D3DVERTEXBUFFERDESC *desc, struct IDirect3DVertexBuffer **buffer,
  283. DWORD flags, IUnknown *outer) PURE;
  284. STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID device_iid, LPD3DENUMPIXELFORMATSCALLBACK cb, void *ctx) PURE;
  285. STDMETHOD(EvictManagedTextures)(THIS) PURE;
  286. };
  287. #undef INTERFACE
  288. #if !defined(__cplusplus) || defined(CINTERFACE)
  289. /*** IUnknown methods ***/
  290. #define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  291. #define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p)
  292. #define IDirect3D3_Release(p) (p)->lpVtbl->Release(p)
  293. /*** IDirect3D3 methods ***/
  294. #define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  295. #define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  296. #define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  297. #define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  298. #define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  299. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
  300. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d)
  301. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
  302. #define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
  303. #else
  304. /*** IUnknown methods ***/
  305. #define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  306. #define IDirect3D3_AddRef(p) (p)->AddRef()
  307. #define IDirect3D3_Release(p) (p)->Release()
  308. /*** IDirect3D3 methods ***/
  309. #define IDirect3D3_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  310. #define IDirect3D3_CreateLight(p,a,b) (p)->CreateLight(a,b)
  311. #define IDirect3D3_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  312. #define IDirect3D3_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  313. #define IDirect3D3_FindDevice(p,a,b) (p)->FindDevice(a,b)
  314. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d)
  315. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d)
  316. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
  317. #define IDirect3D3_EvictManagedTextures(p) (p)->EvictManagedTextures()
  318. #endif
  319. /*****************************************************************************
  320. * IDirect3D7 interface
  321. */
  322. #define INTERFACE IDirect3D7
  323. DECLARE_INTERFACE_(IDirect3D7,IUnknown)
  324. {
  325. /*** IUnknown methods ***/
  326. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  327. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  328. STDMETHOD_(ULONG,Release)(THIS) PURE;
  329. /*** IDirect3D7 methods ***/
  330. STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7 cb, void *ctx) PURE;
  331. STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid, IDirectDrawSurface7 *surface,
  332. struct IDirect3DDevice7 **device) PURE;
  333. STDMETHOD(CreateVertexBuffer)(THIS_ D3DVERTEXBUFFERDESC *desc,
  334. struct IDirect3DVertexBuffer7 **buffer, DWORD flags) PURE;
  335. STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID device_iid, LPD3DENUMPIXELFORMATSCALLBACK cb, void *ctx) PURE;
  336. STDMETHOD(EvictManagedTextures)(THIS) PURE;
  337. };
  338. #undef INTERFACE
  339. #if !defined(__cplusplus) || defined(CINTERFACE)
  340. /*** IUnknown methods ***/
  341. #define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  342. #define IDirect3D7_AddRef(p) (p)->lpVtbl->AddRef(p)
  343. #define IDirect3D7_Release(p) (p)->lpVtbl->Release(p)
  344. /*** IDirect3D3 methods ***/
  345. #define IDirect3D7_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  346. #define IDirect3D7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  347. #define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c)
  348. #define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
  349. #define IDirect3D7_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
  350. #else
  351. /*** IUnknown methods ***/
  352. #define IDirect3D7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  353. #define IDirect3D7_AddRef(p) (p)->AddRef()
  354. #define IDirect3D7_Release(p) (p)->Release()
  355. /*** IDirect3D3 methods ***/
  356. #define IDirect3D7_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  357. #define IDirect3D7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  358. #define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->CreateVertexBuffer(a,b,c)
  359. #define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
  360. #define IDirect3D7_EvictManagedTextures(p) (p)->EvictManagedTextures()
  361. #endif
  362. /*****************************************************************************
  363. * IDirect3DLight interface
  364. */
  365. #define INTERFACE IDirect3DLight
  366. DECLARE_INTERFACE_(IDirect3DLight,IUnknown)
  367. {
  368. /*** IUnknown methods ***/
  369. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  370. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  371. STDMETHOD_(ULONG,Release)(THIS) PURE;
  372. /*** IDirect3DLight methods ***/
  373. STDMETHOD(Initialize)(THIS_ IDirect3D *d3d) PURE;
  374. STDMETHOD(SetLight)(THIS_ D3DLIGHT *data) PURE;
  375. STDMETHOD(GetLight)(THIS_ D3DLIGHT *data) PURE;
  376. };
  377. #undef INTERFACE
  378. #if !defined(__cplusplus) || defined(CINTERFACE)
  379. /*** IUnknown methods ***/
  380. #define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  381. #define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
  382. #define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
  383. /*** IDirect3DLight methods ***/
  384. #define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  385. #define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a)
  386. #define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a)
  387. #else
  388. /*** IUnknown methods ***/
  389. #define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  390. #define IDirect3DLight_AddRef(p) (p)->AddRef()
  391. #define IDirect3DLight_Release(p) (p)->Release()
  392. /*** IDirect3DLight methods ***/
  393. #define IDirect3DLight_Initialize(p,a) (p)->Initialize(a)
  394. #define IDirect3DLight_SetLight(p,a) (p)->SetLight(a)
  395. #define IDirect3DLight_GetLight(p,a) (p)->GetLight(a)
  396. #endif
  397. /*****************************************************************************
  398. * IDirect3DMaterial interface
  399. */
  400. #define INTERFACE IDirect3DMaterial
  401. DECLARE_INTERFACE_(IDirect3DMaterial,IUnknown)
  402. {
  403. /*** IUnknown methods ***/
  404. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  405. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  406. STDMETHOD_(ULONG,Release)(THIS) PURE;
  407. /*** IDirect3DMaterial methods ***/
  408. STDMETHOD(Initialize)(THIS_ IDirect3D *d3d) PURE;
  409. STDMETHOD(SetMaterial)(THIS_ D3DMATERIAL *data) PURE;
  410. STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL *data) PURE;
  411. STDMETHOD(GetHandle)(THIS_ struct IDirect3DDevice *device, D3DMATERIALHANDLE *handle) PURE;
  412. STDMETHOD(Reserve)(THIS) PURE;
  413. STDMETHOD(Unreserve)(THIS) PURE;
  414. };
  415. #undef INTERFACE
  416. #if !defined(__cplusplus) || defined(CINTERFACE)
  417. /*** IUnknown methods ***/
  418. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  419. #define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
  420. #define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
  421. /*** IDirect3DMaterial methods ***/
  422. #define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  423. #define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  424. #define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  425. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  426. #define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
  427. #define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
  428. #else
  429. /*** IUnknown methods ***/
  430. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  431. #define IDirect3DMaterial_AddRef(p) (p)->AddRef()
  432. #define IDirect3DMaterial_Release(p) (p)->Release()
  433. /*** IDirect3DMaterial methods ***/
  434. #define IDirect3DMaterial_Initialize(p,a) (p)->Initialize(a)
  435. #define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a)
  436. #define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a)
  437. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b)
  438. #define IDirect3DMaterial_Reserve(p) (p)->Reserve()
  439. #define IDirect3DMaterial_Unreserve(p) (p)->Unreserve()
  440. #endif
  441. /*****************************************************************************
  442. * IDirect3DMaterial2 interface
  443. */
  444. #define INTERFACE IDirect3DMaterial2
  445. DECLARE_INTERFACE_(IDirect3DMaterial2,IUnknown)
  446. {
  447. /*** IUnknown methods ***/
  448. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  449. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  450. STDMETHOD_(ULONG,Release)(THIS) PURE;
  451. /*** IDirect3DMaterial2 methods ***/
  452. STDMETHOD(SetMaterial)(THIS_ D3DMATERIAL *data) PURE;
  453. STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL *data) PURE;
  454. STDMETHOD(GetHandle)(THIS_ struct IDirect3DDevice2 *device, D3DMATERIALHANDLE *handle) PURE;
  455. };
  456. #undef INTERFACE
  457. #if !defined(__cplusplus) || defined(CINTERFACE)
  458. /*** IUnknown methods ***/
  459. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  460. #define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
  461. #define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
  462. /*** IDirect3DMaterial2 methods ***/
  463. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  464. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  465. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  466. #else
  467. /*** IUnknown methods ***/
  468. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  469. #define IDirect3DMaterial2_AddRef(p) (p)->AddRef()
  470. #define IDirect3DMaterial2_Release(p) (p)->Release()
  471. /*** IDirect3DMaterial2 methods ***/
  472. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a)
  473. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a)
  474. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  475. #endif
  476. /*****************************************************************************
  477. * IDirect3DMaterial3 interface
  478. */
  479. #define INTERFACE IDirect3DMaterial3
  480. DECLARE_INTERFACE_(IDirect3DMaterial3,IUnknown)
  481. {
  482. /*** IUnknown methods ***/
  483. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  484. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  485. STDMETHOD_(ULONG,Release)(THIS) PURE;
  486. /*** IDirect3DMaterial3 methods ***/
  487. STDMETHOD(SetMaterial)(THIS_ D3DMATERIAL *data) PURE;
  488. STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL *data) PURE;
  489. STDMETHOD(GetHandle)(THIS_ struct IDirect3DDevice3 *device, D3DMATERIALHANDLE *handle) PURE;
  490. };
  491. #undef INTERFACE
  492. #if !defined(__cplusplus) || defined(CINTERFACE)
  493. /*** IUnknown methods ***/
  494. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  495. #define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p)
  496. #define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p)
  497. /*** IDirect3DMaterial3 methods ***/
  498. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  499. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  500. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  501. #else
  502. /*** IUnknown methods ***/
  503. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  504. #define IDirect3DMaterial3_AddRef(p) (p)->AddRef()
  505. #define IDirect3DMaterial3_Release(p) (p)->Release()
  506. /*** IDirect3DMaterial3 methods ***/
  507. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a)
  508. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a)
  509. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b)
  510. #endif
  511. /*****************************************************************************
  512. * IDirect3DTexture interface
  513. */
  514. #define INTERFACE IDirect3DTexture
  515. DECLARE_INTERFACE_(IDirect3DTexture,IUnknown)
  516. {
  517. /*** IUnknown methods ***/
  518. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  519. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  520. STDMETHOD_(ULONG,Release)(THIS) PURE;
  521. /*** IDirect3DTexture methods ***/
  522. STDMETHOD(Initialize)(THIS_ struct IDirect3DDevice *device, IDirectDrawSurface *surface) PURE;
  523. STDMETHOD(GetHandle)(THIS_ struct IDirect3DDevice *device, D3DTEXTUREHANDLE *handle) PURE;
  524. STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE;
  525. STDMETHOD(Load)(THIS_ IDirect3DTexture *texture) PURE;
  526. STDMETHOD(Unload)(THIS) PURE;
  527. };
  528. #undef INTERFACE
  529. #if !defined(__cplusplus) || defined(CINTERFACE)
  530. /*** IUnknown methods ***/
  531. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  532. #define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
  533. #define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
  534. /*** IDirect3DTexture methods ***/
  535. #define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  536. #define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  537. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  538. #define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a)
  539. #define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
  540. #else
  541. /*** IUnknown methods ***/
  542. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  543. #define IDirect3DTexture_AddRef(p) (p)->AddRef()
  544. #define IDirect3DTexture_Release(p) (p)->Release()
  545. /*** IDirect3DTexture methods ***/
  546. #define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b)
  547. #define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b)
  548. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  549. #define IDirect3DTexture_Load(p,a) (p)->Load(a)
  550. #define IDirect3DTexture_Unload(p) (p)->Unload()
  551. #endif
  552. /*****************************************************************************
  553. * IDirect3DTexture2 interface
  554. */
  555. #define INTERFACE IDirect3DTexture2
  556. DECLARE_INTERFACE_(IDirect3DTexture2,IUnknown)
  557. {
  558. /*** IUnknown methods ***/
  559. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  560. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  561. STDMETHOD_(ULONG,Release)(THIS) PURE;
  562. /*** IDirect3DTexture2 methods ***/
  563. STDMETHOD(GetHandle)(THIS_ struct IDirect3DDevice2 *device, D3DTEXTUREHANDLE *handle) PURE;
  564. STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE;
  565. STDMETHOD(Load)(THIS_ IDirect3DTexture2 *texture) PURE;
  566. };
  567. #undef INTERFACE
  568. #if !defined(__cplusplus) || defined(CINTERFACE)
  569. /*** IUnknown methods ***/
  570. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  571. #define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
  572. #define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
  573. /*** IDirect3DTexture2 methods ***/
  574. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  575. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  576. #define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a)
  577. #else
  578. /*** IUnknown methods ***/
  579. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  580. #define IDirect3DTexture2_AddRef(p) (p)->AddRef()
  581. #define IDirect3DTexture2_Release(p) (p)->Release()
  582. /*** IDirect3DTexture2 methods ***/
  583. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  584. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  585. #define IDirect3DTexture2_Load(p,a) (p)->Load(a)
  586. #endif
  587. /*****************************************************************************
  588. * IDirect3DViewport interface
  589. */
  590. #define INTERFACE IDirect3DViewport
  591. DECLARE_INTERFACE_(IDirect3DViewport,IUnknown)
  592. {
  593. /*** IUnknown methods ***/
  594. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  595. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  596. STDMETHOD_(ULONG,Release)(THIS) PURE;
  597. /*** IDirect3DViewport methods ***/
  598. STDMETHOD(Initialize)(THIS_ IDirect3D *d3d) PURE;
  599. STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT *data) PURE;
  600. STDMETHOD(SetViewport)(THIS_ D3DVIEWPORT *data) PURE;
  601. STDMETHOD(TransformVertices)(THIS_ DWORD vertex_count, D3DTRANSFORMDATA *data, DWORD flags, DWORD *offscreen) PURE;
  602. STDMETHOD(LightElements)(THIS_ DWORD element_count, D3DLIGHTDATA *data) PURE;
  603. STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE;
  604. STDMETHOD(GetBackground)(THIS_ D3DMATERIALHANDLE *material, WINBOOL *valid) PURE;
  605. STDMETHOD(SetBackgroundDepth)(THIS_ IDirectDrawSurface *surface) PURE;
  606. STDMETHOD(GetBackgroundDepth)(THIS_ IDirectDrawSurface **surface, WINBOOL *valid) PURE;
  607. STDMETHOD(Clear)(THIS_ DWORD count, D3DRECT *rects, DWORD flags) PURE;
  608. STDMETHOD(AddLight)(THIS_ IDirect3DLight *light) PURE;
  609. STDMETHOD(DeleteLight)(THIS_ IDirect3DLight *light) PURE;
  610. STDMETHOD(NextLight)(THIS_ IDirect3DLight *ref, IDirect3DLight **light, DWORD flags) PURE;
  611. };
  612. #undef INTERFACE
  613. #if !defined(__cplusplus) || defined(CINTERFACE)
  614. /*** IUnknown methods ***/
  615. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  616. #define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
  617. #define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
  618. /*** IDirect3DViewport methods ***/
  619. #define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  620. #define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  621. #define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  622. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  623. #define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  624. #define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  625. #define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  626. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  627. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  628. #define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  629. #define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  630. #define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  631. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  632. #else
  633. /*** IUnknown methods ***/
  634. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  635. #define IDirect3DViewport_AddRef(p) (p)->AddRef()
  636. #define IDirect3DViewport_Release(p) (p)->Release()
  637. /*** IDirect3DViewport methods ***/
  638. #define IDirect3DViewport_Initialize(p,a) (p)->Initialize(a)
  639. #define IDirect3DViewport_GetViewport(p,a) (p)->GetViewport(a)
  640. #define IDirect3DViewport_SetViewport(p,a) (p)->SetViewport(a)
  641. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  642. #define IDirect3DViewport_LightElements(p,a,b) (p)->LightElements(a,b)
  643. #define IDirect3DViewport_SetBackground(p,a) (p)->SetBackground(a)
  644. #define IDirect3DViewport_GetBackground(p,a,b) (p)->GetBackground(a,b)
  645. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  646. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  647. #define IDirect3DViewport_Clear(p,a,b,c) (p)->Clear(a,b,c)
  648. #define IDirect3DViewport_AddLight(p,a) (p)->AddLight(a)
  649. #define IDirect3DViewport_DeleteLight(p,a) (p)->DeleteLight(a)
  650. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  651. #endif
  652. /*****************************************************************************
  653. * IDirect3DViewport2 interface
  654. */
  655. #define INTERFACE IDirect3DViewport2
  656. DECLARE_INTERFACE_(IDirect3DViewport2,IDirect3DViewport)
  657. {
  658. /*** IUnknown methods ***/
  659. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  660. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  661. STDMETHOD_(ULONG,Release)(THIS) PURE;
  662. /*** IDirect3DViewport methods ***/
  663. STDMETHOD(Initialize)(THIS_ IDirect3D *d3d) PURE;
  664. STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT *data) PURE;
  665. STDMETHOD(SetViewport)(THIS_ D3DVIEWPORT *data) PURE;
  666. STDMETHOD(TransformVertices)(THIS_ DWORD vertex_count, D3DTRANSFORMDATA *data, DWORD flags, DWORD *offscreen) PURE;
  667. STDMETHOD(LightElements)(THIS_ DWORD element_count, D3DLIGHTDATA *data) PURE;
  668. STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE;
  669. STDMETHOD(GetBackground)(THIS_ D3DMATERIALHANDLE *material, WINBOOL *valid) PURE;
  670. STDMETHOD(SetBackgroundDepth)(THIS_ IDirectDrawSurface *surface) PURE;
  671. STDMETHOD(GetBackgroundDepth)(THIS_ IDirectDrawSurface **surface, WINBOOL *valid) PURE;
  672. STDMETHOD(Clear)(THIS_ DWORD count, D3DRECT *rects, DWORD flags) PURE;
  673. STDMETHOD(AddLight)(THIS_ IDirect3DLight *light) PURE;
  674. STDMETHOD(DeleteLight)(THIS_ IDirect3DLight *light) PURE;
  675. STDMETHOD(NextLight)(THIS_ IDirect3DLight *ref, IDirect3DLight **light, DWORD flags) PURE;
  676. /*** IDirect3DViewport2 methods ***/
  677. STDMETHOD(GetViewport2)(THIS_ D3DVIEWPORT2 *data) PURE;
  678. STDMETHOD(SetViewport2)(THIS_ D3DVIEWPORT2 *data) PURE;
  679. };
  680. #undef INTERFACE
  681. #if !defined(__cplusplus) || defined(CINTERFACE)
  682. /*** IUnknown methods ***/
  683. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  684. #define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
  685. #define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
  686. /*** IDirect3Viewport methods ***/
  687. #define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  688. #define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  689. #define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  690. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  691. #define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  692. #define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  693. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  694. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  695. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  696. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  697. #define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  698. #define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  699. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  700. /*** IDirect3DViewport2 methods ***/
  701. #define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  702. #define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  703. #else
  704. /*** IUnknown methods ***/
  705. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  706. #define IDirect3DViewport2_AddRef(p) (p)->AddRef()
  707. #define IDirect3DViewport2_Release(p) (p)->Release()
  708. /*** IDirect3Viewport methods ***/
  709. #define IDirect3DViewport2_Initialize(p,a) (p)->Initialize(a)
  710. #define IDirect3DViewport2_GetViewport(p,a) (p)->GetViewport(a)
  711. #define IDirect3DViewport2_SetViewport(p,a) (p)->SetViewport(a)
  712. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  713. #define IDirect3DViewport2_LightElements(p,a,b) (p)->LightElements(a,b)
  714. #define IDirect3DViewport2_SetBackground(p,a) (p)->SetBackground(a)
  715. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->GetBackground(a,b)
  716. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  717. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  718. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->Clear(a,b,c)
  719. #define IDirect3DViewport2_AddLight(p,a) (p)->AddLight(a)
  720. #define IDirect3DViewport2_DeleteLight(p,a) (p)->DeleteLight(a)
  721. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  722. /*** IDirect3DViewport2 methods ***/
  723. #define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a)
  724. #define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a)
  725. #endif
  726. /*****************************************************************************
  727. * IDirect3DViewport3 interface
  728. */
  729. #define INTERFACE IDirect3DViewport3
  730. DECLARE_INTERFACE_(IDirect3DViewport3,IDirect3DViewport2)
  731. {
  732. /*** IUnknown methods ***/
  733. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  734. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  735. STDMETHOD_(ULONG,Release)(THIS) PURE;
  736. /*** IDirect3DViewport methods ***/
  737. STDMETHOD(Initialize)(THIS_ IDirect3D *d3d) PURE;
  738. STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT *data) PURE;
  739. STDMETHOD(SetViewport)(THIS_ D3DVIEWPORT *data) PURE;
  740. STDMETHOD(TransformVertices)(THIS_ DWORD vertex_count, D3DTRANSFORMDATA *data, DWORD flags, DWORD *offscreen) PURE;
  741. STDMETHOD(LightElements)(THIS_ DWORD element_count, D3DLIGHTDATA *data) PURE;
  742. STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE;
  743. STDMETHOD(GetBackground)(THIS_ D3DMATERIALHANDLE *material, WINBOOL *valid) PURE;
  744. STDMETHOD(SetBackgroundDepth)(THIS_ IDirectDrawSurface *surface) PURE;
  745. STDMETHOD(GetBackgroundDepth)(THIS_ IDirectDrawSurface **surface, WINBOOL *valid) PURE;
  746. STDMETHOD(Clear)(THIS_ DWORD count, D3DRECT *rects, DWORD flags) PURE;
  747. STDMETHOD(AddLight)(THIS_ IDirect3DLight *light) PURE;
  748. STDMETHOD(DeleteLight)(THIS_ IDirect3DLight *light) PURE;
  749. STDMETHOD(NextLight)(THIS_ IDirect3DLight *ref, IDirect3DLight **light, DWORD flags) PURE;
  750. /*** IDirect3DViewport2 methods ***/
  751. STDMETHOD(GetViewport2)(THIS_ D3DVIEWPORT2 *data) PURE;
  752. STDMETHOD(SetViewport2)(THIS_ D3DVIEWPORT2 *data) PURE;
  753. /*** IDirect3DViewport3 methods ***/
  754. STDMETHOD(SetBackgroundDepth2)(THIS_ IDirectDrawSurface4 *surface) PURE;
  755. STDMETHOD(GetBackgroundDepth2)(THIS_ IDirectDrawSurface4 **surface, WINBOOL *valid) PURE;
  756. STDMETHOD(Clear2)(THIS_ DWORD count, D3DRECT *rects, DWORD flags, DWORD color, D3DVALUE z, DWORD stencil) PURE;
  757. };
  758. #undef INTERFACE
  759. #if !defined(__cplusplus) || defined(CINTERFACE)
  760. /*** IUnknown methods ***/
  761. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  762. #define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p)
  763. #define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p)
  764. /*** IDirect3Viewport methods ***/
  765. #define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  766. #define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  767. #define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  768. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  769. #define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  770. #define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  771. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  772. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  773. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  774. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  775. #define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  776. #define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  777. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  778. /*** IDirect3DViewport2 methods ***/
  779. #define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  780. #define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  781. /*** IDirect3DViewport3 methods ***/
  782. #define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->lpVtbl->SetBackgroundDepth2(p,a)
  783. #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b)
  784. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f)
  785. #else
  786. /*** IUnknown methods ***/
  787. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  788. #define IDirect3DViewport3_AddRef(p) (p)->AddRef()
  789. #define IDirect3DViewport3_Release(p) (p)->Release()
  790. /*** IDirect3Viewport methods ***/
  791. #define IDirect3DViewport3_Initialize(p,a) (p)->Initialize(a)
  792. #define IDirect3DViewport3_GetViewport(p,a) (p)->GetViewport(a)
  793. #define IDirect3DViewport3_SetViewport(p,a) (p)->SetViewport(a)
  794. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  795. #define IDirect3DViewport3_LightElements(p,a,b) (p)->LightElements(a,b)
  796. #define IDirect3DViewport3_SetBackground(p,a) (p)->SetBackground(a)
  797. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->GetBackground(a,b)
  798. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  799. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  800. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->Clear(a,b,c)
  801. #define IDirect3DViewport3_AddLight(p,a) (p)->AddLight(a)
  802. #define IDirect3DViewport3_DeleteLight(p,a) (p)->DeleteLight(a)
  803. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  804. /*** IDirect3DViewport2 methods ***/
  805. #define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a)
  806. #define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a)
  807. /*** IDirect3DViewport3 methods ***/
  808. #define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->SetBackgroundDepth2(a)
  809. #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->GetBackgroundDepth2(a,b)
  810. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->Clear2(a,b,c,d,e,f)
  811. #endif
  812. /*****************************************************************************
  813. * IDirect3DExecuteBuffer interface
  814. */
  815. #define INTERFACE IDirect3DExecuteBuffer
  816. DECLARE_INTERFACE_(IDirect3DExecuteBuffer,IUnknown)
  817. {
  818. /*** IUnknown methods ***/
  819. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  820. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  821. STDMETHOD_(ULONG,Release)(THIS) PURE;
  822. /*** IDirect3DExecuteBuffer methods ***/
  823. STDMETHOD(Initialize)(THIS_ struct IDirect3DDevice *device, D3DEXECUTEBUFFERDESC *desc) PURE;
  824. STDMETHOD(Lock)(THIS_ D3DEXECUTEBUFFERDESC *desc) PURE;
  825. STDMETHOD(Unlock)(THIS) PURE;
  826. STDMETHOD(SetExecuteData)(THIS_ D3DEXECUTEDATA *data) PURE;
  827. STDMETHOD(GetExecuteData)(THIS_ D3DEXECUTEDATA *data) PURE;
  828. STDMETHOD(Validate)(THIS_ DWORD *offset, LPD3DVALIDATECALLBACK cb, void *ctx, DWORD reserved) PURE;
  829. STDMETHOD(Optimize)(THIS_ DWORD dwDummy) PURE;
  830. };
  831. #undef INTERFACE
  832. #if !defined(__cplusplus) || defined(CINTERFACE)
  833. /*** IUnknown methods ***/
  834. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  835. #define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  836. #define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
  837. /*** IDirect3DExecuteBuffer methods ***/
  838. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  839. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a)
  840. #define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  841. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a)
  842. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a)
  843. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d)
  844. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a)
  845. #else
  846. /*** IUnknown methods ***/
  847. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  848. #define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef()
  849. #define IDirect3DExecuteBuffer_Release(p) (p)->Release()
  850. /*** IDirect3DExecuteBuffer methods ***/
  851. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  852. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->Lock(a)
  853. #define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock()
  854. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a)
  855. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a)
  856. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d)
  857. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->Optimize(a)
  858. #endif
  859. /*****************************************************************************
  860. * IDirect3DDevice interface
  861. */
  862. #define INTERFACE IDirect3DDevice
  863. DECLARE_INTERFACE_(IDirect3DDevice,IUnknown)
  864. {
  865. /*** IUnknown methods ***/
  866. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  867. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  868. STDMETHOD_(ULONG,Release)(THIS) PURE;
  869. /*** IDirect3DDevice methods ***/
  870. STDMETHOD(Initialize)(THIS_ IDirect3D *d3d, GUID *guid, D3DDEVICEDESC *desc) PURE;
  871. STDMETHOD(GetCaps)(THIS_ D3DDEVICEDESC *hal_desc, D3DDEVICEDESC *hel_desc) PURE;
  872. STDMETHOD(SwapTextureHandles)(THIS_ IDirect3DTexture *tex1, IDirect3DTexture *tex2) PURE;
  873. STDMETHOD(CreateExecuteBuffer)(THIS_ D3DEXECUTEBUFFERDESC *desc,
  874. IDirect3DExecuteBuffer **buffer, IUnknown *outer) PURE;
  875. STDMETHOD(GetStats)(THIS_ D3DSTATS *stats) PURE;
  876. STDMETHOD(Execute)(THIS_ IDirect3DExecuteBuffer *buffer, IDirect3DViewport *viewport,
  877. DWORD flags) PURE;
  878. STDMETHOD(AddViewport)(THIS_ IDirect3DViewport *viewport) PURE;
  879. STDMETHOD(DeleteViewport)(THIS_ IDirect3DViewport *viewport) PURE;
  880. STDMETHOD(NextViewport)(THIS_ IDirect3DViewport *ref,
  881. IDirect3DViewport **viewport, DWORD flags) PURE;
  882. STDMETHOD(Pick)(THIS_ IDirect3DExecuteBuffer *buffer, IDirect3DViewport *viewport,
  883. DWORD flags, D3DRECT *rect) PURE;
  884. STDMETHOD(GetPickRecords)(THIS_ DWORD *count, D3DPICKRECORD *records) PURE;
  885. STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK cb, void *ctx) PURE;
  886. STDMETHOD(CreateMatrix)(THIS_ D3DMATRIXHANDLE *matrix) PURE;
  887. STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE handle, D3DMATRIX *matrix) PURE;
  888. STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE handle, D3DMATRIX *matrix) PURE;
  889. STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle) PURE;
  890. STDMETHOD(BeginScene)(THIS) PURE;
  891. STDMETHOD(EndScene)(THIS) PURE;
  892. STDMETHOD(GetDirect3D)(THIS_ IDirect3D **d3d) PURE;
  893. };
  894. #undef INTERFACE
  895. #if !defined(__cplusplus) || defined(CINTERFACE)
  896. /*** IUnknown methods ***/
  897. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  898. #define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  899. #define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
  900. /*** IDirect3DDevice methods ***/
  901. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  902. #define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  903. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  904. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c)
  905. #define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  906. #define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c)
  907. #define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  908. #define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  909. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  910. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d)
  911. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b)
  912. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  913. #define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a)
  914. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b)
  915. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b)
  916. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a)
  917. #define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  918. #define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
  919. #define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  920. #else
  921. /*** IUnknown methods ***/
  922. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  923. #define IDirect3DDevice_AddRef(p) (p)->AddRef()
  924. #define IDirect3DDevice_Release(p) (p)->Release()
  925. /*** IDirect3DDevice methods ***/
  926. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  927. #define IDirect3DDevice_GetCaps(p,a,b) (p)->GetCaps(a,b)
  928. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  929. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c)
  930. #define IDirect3DDevice_GetStats(p,a) (p)->GetStats(a)
  931. #define IDirect3DDevice_Execute(p,a,b,c) (p)->Execute(a,b,c)
  932. #define IDirect3DDevice_AddViewport(p,a) (p)->AddViewport(a)
  933. #define IDirect3DDevice_DeleteViewport(p,a) (p)->DeleteViewport(a)
  934. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  935. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->Pick(a,b,c,d)
  936. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->GetPickRecords(a,b)
  937. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  938. #define IDirect3DDevice_CreateMatrix(p,a) (p)->CreateMatrix(a)
  939. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->SetMatrix(a,b)
  940. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->GetMatrix(a,b)
  941. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->DeleteMatrix(a)
  942. #define IDirect3DDevice_BeginScene(p) (p)->BeginScene()
  943. #define IDirect3DDevice_EndScene(p) (p)->EndScene()
  944. #define IDirect3DDevice_GetDirect3D(p,a) (p)->GetDirect3D(a)
  945. #endif
  946. /*****************************************************************************
  947. * IDirect3DDevice2 interface
  948. */
  949. #define INTERFACE IDirect3DDevice2
  950. DECLARE_INTERFACE_(IDirect3DDevice2,IUnknown)
  951. {
  952. /*** IUnknown methods ***/
  953. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  954. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  955. STDMETHOD_(ULONG,Release)(THIS) PURE;
  956. /*** IDirect3DDevice2 methods ***/
  957. STDMETHOD(GetCaps)(THIS_ D3DDEVICEDESC *hal_desc, D3DDEVICEDESC *hel_desc) PURE;
  958. STDMETHOD(SwapTextureHandles)(THIS_ IDirect3DTexture2 *tex1, IDirect3DTexture2 *tex2) PURE;
  959. STDMETHOD(GetStats)(THIS_ D3DSTATS *stats) PURE;
  960. STDMETHOD(AddViewport)(THIS_ IDirect3DViewport2 *viewport) PURE;
  961. STDMETHOD(DeleteViewport)(THIS_ IDirect3DViewport2 *viewport) PURE;
  962. STDMETHOD(NextViewport)(THIS_ IDirect3DViewport2 *ref,
  963. IDirect3DViewport2 **viewport, DWORD flags) PURE;
  964. STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK cb, void *ctx) PURE;
  965. STDMETHOD(BeginScene)(THIS) PURE;
  966. STDMETHOD(EndScene)(THIS) PURE;
  967. STDMETHOD(GetDirect3D)(THIS_ IDirect3D2 **d3d) PURE;
  968. /*** DrawPrimitive API ***/
  969. STDMETHOD(SetCurrentViewport)(THIS_ IDirect3DViewport2 *viewport) PURE;
  970. STDMETHOD(GetCurrentViewport)(THIS_ IDirect3DViewport2 **viewport) PURE;
  971. STDMETHOD(SetRenderTarget)(THIS_ IDirectDrawSurface *surface, DWORD flags) PURE;
  972. STDMETHOD(GetRenderTarget)(THIS_ IDirectDrawSurface **surface) PURE;
  973. STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dpt,D3DVERTEXTYPE dwVertexTypeDesc,DWORD dwFlags) PURE;
  974. STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE primitive_type, D3DVERTEXTYPE vertex_type,
  975. void *vertices, DWORD vertex_count, DWORD flags) PURE;
  976. STDMETHOD(Vertex)(THIS_ void *vertex) PURE;
  977. STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE;
  978. STDMETHOD(End)(THIS_ DWORD dwFlags) PURE;
  979. STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE;
  980. STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE;
  981. STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE;
  982. STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE;
  983. STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  984. STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  985. STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  986. STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE primitive_type, D3DVERTEXTYPE vertex_type,
  987. void *vertices, DWORD vertex_count, DWORD flags) PURE;
  988. STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE primitive_type, D3DVERTEXTYPE vertex_type,
  989. void *vertices, DWORD vertex_count, WORD *indices, DWORD index_count, DWORD flags) PURE;
  990. STDMETHOD(SetClipStatus)(THIS_ D3DCLIPSTATUS *clip_status) PURE;
  991. STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS *clip_status) PURE;
  992. };
  993. #undef INTERFACE
  994. #if !defined(__cplusplus) || defined(CINTERFACE)
  995. /*** IUnknown methods ***/
  996. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  997. #define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
  998. #define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
  999. /*** IDirect3DDevice2 methods ***/
  1000. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1001. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  1002. #define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  1003. #define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  1004. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  1005. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  1006. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  1007. #define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  1008. #define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
  1009. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  1010. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  1011. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  1012. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  1013. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  1014. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  1015. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  1016. #define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  1017. #define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a)
  1018. #define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a)
  1019. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  1020. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  1021. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  1022. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  1023. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  1024. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  1025. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  1026. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  1027. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  1028. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  1029. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  1030. #else
  1031. /*** IUnknown methods ***/
  1032. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1033. #define IDirect3DDevice2_AddRef(p) (p)->AddRef()
  1034. #define IDirect3DDevice2_Release(p) (p)->Release()
  1035. /*** IDirect3DDevice2 methods ***/
  1036. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1037. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  1038. #define IDirect3DDevice2_GetStats(p,a) (p)->GetStats(a)
  1039. #define IDirect3DDevice2_AddViewport(p,a) (p)->AddViewport(a)
  1040. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->DeleteViewport(a)
  1041. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  1042. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  1043. #define IDirect3DDevice2_BeginScene(p) (p)->BeginScene()
  1044. #define IDirect3DDevice2_EndScene(p) (p)->EndScene()
  1045. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->GetDirect3D(a)
  1046. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  1047. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  1048. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  1049. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  1050. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->Begin(a,b,c)
  1051. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  1052. #define IDirect3DDevice2_Vertex(p,a) (p)->Vertex(a)
  1053. #define IDirect3DDevice2_Index(p,a) (p)->Index(a)
  1054. #define IDirect3DDevice2_End(p,a) (p)->End(a)
  1055. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  1056. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  1057. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->GetLightState(a,b)
  1058. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->SetLightState(a,b)
  1059. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->SetTransform(a,b)
  1060. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->GetTransform(a,b)
  1061. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  1062. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  1063. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  1064. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->SetClipStatus(a)
  1065. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->GetClipStatus(a)
  1066. #endif
  1067. /*****************************************************************************
  1068. * IDirect3DDevice3 interface
  1069. */
  1070. #define INTERFACE IDirect3DDevice3
  1071. DECLARE_INTERFACE_(IDirect3DDevice3,IUnknown)
  1072. {
  1073. /*** IUnknown methods ***/
  1074. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1075. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1076. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1077. /*** IDirect3DDevice3 methods ***/
  1078. STDMETHOD(GetCaps)(THIS_ D3DDEVICEDESC *hal_desc, D3DDEVICEDESC *hel_desc) PURE;
  1079. STDMETHOD(GetStats)(THIS_ D3DSTATS *stats) PURE;
  1080. STDMETHOD(AddViewport)(THIS_ IDirect3DViewport3 *viewport) PURE;
  1081. STDMETHOD(DeleteViewport)(THIS_ IDirect3DViewport3 *viewport) PURE;
  1082. STDMETHOD(NextViewport)(THIS_ IDirect3DViewport3 *ref,
  1083. IDirect3DViewport3 **viewport, DWORD flags) PURE;
  1084. STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK cb, void *ctx) PURE;
  1085. STDMETHOD(BeginScene)(THIS) PURE;
  1086. STDMETHOD(EndScene)(THIS) PURE;
  1087. STDMETHOD(GetDirect3D)(THIS_ IDirect3D3 **d3d) PURE;
  1088. /*** DrawPrimitive API ***/
  1089. STDMETHOD(SetCurrentViewport)(THIS_ IDirect3DViewport3 *viewport) PURE;
  1090. STDMETHOD(GetCurrentViewport)(THIS_ IDirect3DViewport3 **viewport) PURE;
  1091. STDMETHOD(SetRenderTarget)(THIS_ IDirectDrawSurface4 *surface, DWORD flags) PURE;
  1092. STDMETHOD(GetRenderTarget)(THIS_ IDirectDrawSurface4 **surface) PURE;
  1093. STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexTypeDesc, DWORD dwFlags) PURE;
  1094. STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1095. void *vertices, DWORD vertex_count, DWORD flags) PURE;
  1096. STDMETHOD(Vertex)(THIS_ void *vertex) PURE;
  1097. STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE;
  1098. STDMETHOD(End)(THIS_ DWORD dwFlags) PURE;
  1099. STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE;
  1100. STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE;
  1101. STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE;
  1102. STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE;
  1103. STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  1104. STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  1105. STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  1106. STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD vertex_type,
  1107. void *vertices, DWORD vertex_count, DWORD flags) PURE;
  1108. STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1109. void *vertices, DWORD vertex_count, WORD *indices, DWORD index_count, DWORD flags) PURE;
  1110. STDMETHOD(SetClipStatus)(THIS_ D3DCLIPSTATUS *clip_status) PURE;
  1111. STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS *clip_status) PURE;
  1112. STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1113. D3DDRAWPRIMITIVESTRIDEDDATA *strided_data, DWORD vertex_count, DWORD flags) PURE;
  1114. STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1115. D3DDRAWPRIMITIVESTRIDEDDATA *strided_data, DWORD vertex_count, WORD *indices, DWORD index_count,
  1116. DWORD flags) PURE;
  1117. STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE primitive_type, struct IDirect3DVertexBuffer *vb,
  1118. DWORD start_vertex, DWORD vertex_count, DWORD flags) PURE;
  1119. STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE primitive_type, struct IDirect3DVertexBuffer *vb,
  1120. WORD *indices, DWORD index_count, DWORD flags) PURE;
  1121. STDMETHOD(ComputeSphereVisibility)(THIS_ D3DVECTOR *centers, D3DVALUE *radii, DWORD sphere_count,
  1122. DWORD flags, DWORD *ret) PURE;
  1123. STDMETHOD(GetTexture)(THIS_ DWORD stage, IDirect3DTexture2 **texture) PURE;
  1124. STDMETHOD(SetTexture)(THIS_ DWORD stage, IDirect3DTexture2 *texture) PURE;
  1125. STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE;
  1126. STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE;
  1127. STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE;
  1128. };
  1129. #undef INTERFACE
  1130. #if !defined(__cplusplus) || defined(CINTERFACE)
  1131. /*** IUnknown methods ***/
  1132. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1133. #define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p)
  1134. #define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p)
  1135. /*** IDirect3DDevice3 methods ***/
  1136. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1137. #define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  1138. #define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  1139. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  1140. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  1141. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  1142. #define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  1143. #define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p)
  1144. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  1145. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  1146. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  1147. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  1148. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  1149. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  1150. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  1151. #define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  1152. #define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a)
  1153. #define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a)
  1154. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  1155. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  1156. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  1157. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  1158. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  1159. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  1160. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  1161. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  1162. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  1163. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  1164. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  1165. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
  1166. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
  1167. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
  1168. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e)
  1169. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
  1170. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
  1171. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
  1172. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
  1173. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
  1174. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
  1175. #else
  1176. /*** IUnknown methods ***/
  1177. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1178. #define IDirect3DDevice3_AddRef(p) (p)->AddRef()
  1179. #define IDirect3DDevice3_Release(p) (p)->Release()
  1180. /*** IDirect3DDevice3 methods ***/
  1181. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1182. #define IDirect3DDevice3_GetStats(p,a) (p)->GetStats(a)
  1183. #define IDirect3DDevice3_AddViewport(p,a) (p)->AddViewport(a)
  1184. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->DeleteViewport(a)
  1185. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  1186. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  1187. #define IDirect3DDevice3_BeginScene(p) (p)->BeginScene()
  1188. #define IDirect3DDevice3_EndScene(p) (p)->EndScene()
  1189. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->GetDirect3D(a)
  1190. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  1191. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  1192. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  1193. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  1194. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->Begin(a,b,c)
  1195. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  1196. #define IDirect3DDevice3_Vertex(p,a) (p)->Vertex(a)
  1197. #define IDirect3DDevice3_Index(p,a) (p)->Index(a)
  1198. #define IDirect3DDevice3_End(p,a) (p)->End(a)
  1199. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  1200. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  1201. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->GetLightState(a,b)
  1202. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->SetLightState(a,b)
  1203. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->SetTransform(a,b)
  1204. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->GetTransform(a,b)
  1205. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  1206. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  1207. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  1208. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->SetClipStatus(a)
  1209. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->GetClipStatus(a)
  1210. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
  1211. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
  1212. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
  1213. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e)
  1214. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
  1215. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->GetTexture(a,b)
  1216. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->SetTexture(a,b)
  1217. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
  1218. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
  1219. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->ValidateDevice(a)
  1220. #endif
  1221. /*****************************************************************************
  1222. * IDirect3DDevice7 interface
  1223. */
  1224. #define INTERFACE IDirect3DDevice7
  1225. DECLARE_INTERFACE_(IDirect3DDevice7,IUnknown)
  1226. {
  1227. /*** IUnknown methods ***/
  1228. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1229. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1230. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1231. /*** IDirect3DDevice7 methods ***/
  1232. STDMETHOD(GetCaps)(THIS_ D3DDEVICEDESC7 *desc) PURE;
  1233. STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK cb, void *ctx) PURE;
  1234. STDMETHOD(BeginScene)(THIS) PURE;
  1235. STDMETHOD(EndScene)(THIS) PURE;
  1236. STDMETHOD(GetDirect3D)(THIS_ IDirect3D7 **d3d) PURE;
  1237. STDMETHOD(SetRenderTarget)(THIS_ IDirectDrawSurface7 *surface, DWORD flags) PURE;
  1238. STDMETHOD(GetRenderTarget)(THIS_ IDirectDrawSurface7 **surface) PURE;
  1239. STDMETHOD(Clear)(THIS_ DWORD count, D3DRECT *rects, DWORD flags, D3DCOLOR color, D3DVALUE z, DWORD stencil) PURE;
  1240. STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  1241. STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  1242. STDMETHOD(SetViewport)(THIS_ D3DVIEWPORT7 *data) PURE;
  1243. STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) PURE;
  1244. STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT7 *data) PURE;
  1245. STDMETHOD(SetMaterial)(THIS_ D3DMATERIAL7 *data) PURE;
  1246. STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL7 *data) PURE;
  1247. STDMETHOD(SetLight)(THIS_ DWORD idx, D3DLIGHT7 *data) PURE;
  1248. STDMETHOD(GetLight)(THIS_ DWORD idx, D3DLIGHT7 *data) PURE;
  1249. STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE;
  1250. STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE;
  1251. STDMETHOD(BeginStateBlock)(THIS) PURE;
  1252. STDMETHOD(EndStateBlock)(THIS_ LPDWORD lpdwBlockHandle) PURE;
  1253. STDMETHOD(PreLoad)(THIS_ IDirectDrawSurface7 *surface) PURE;
  1254. STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1255. void *vertices, DWORD vertex_count, DWORD flags) PURE;
  1256. STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1257. void *vertices, DWORD vertex_count, WORD *indices, DWORD index_count, DWORD flags) PURE;
  1258. STDMETHOD(SetClipStatus)(THIS_ D3DCLIPSTATUS *clip_status) PURE;
  1259. STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS *clip_status) PURE;
  1260. STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1261. D3DDRAWPRIMITIVESTRIDEDDATA *strided_data, DWORD vertex_count, DWORD flags) PURE;
  1262. STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE primitive_type, DWORD fvf,
  1263. D3DDRAWPRIMITIVESTRIDEDDATA *strided_data, DWORD vertex_count, WORD *indices, DWORD index_count,
  1264. DWORD flags) PURE;
  1265. STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE primitive_type, struct IDirect3DVertexBuffer7 *vb,
  1266. DWORD start_vertex, DWORD vertex_count, DWORD flags) PURE;
  1267. STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE primitive_type, struct IDirect3DVertexBuffer7 *vb,
  1268. DWORD start_vertex, DWORD vertex_count, WORD *indices, DWORD index_count, DWORD flags) PURE;
  1269. STDMETHOD(ComputeSphereVisibility)(THIS_ D3DVECTOR *centers, D3DVALUE *radii, DWORD sphere_count,
  1270. DWORD flags, DWORD *ret) PURE;
  1271. STDMETHOD(GetTexture)(THIS_ DWORD stage, IDirectDrawSurface7 **surface) PURE;
  1272. STDMETHOD(SetTexture)(THIS_ DWORD stage, IDirectDrawSurface7 *surface) PURE;
  1273. STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE;
  1274. STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE;
  1275. STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE;
  1276. STDMETHOD(ApplyStateBlock)(THIS_ DWORD dwBlockHandle) PURE;
  1277. STDMETHOD(CaptureStateBlock)(THIS_ DWORD dwBlockHandle) PURE;
  1278. STDMETHOD(DeleteStateBlock)(THIS_ DWORD dwBlockHandle) PURE;
  1279. STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE d3dsbType,LPDWORD lpdwBlockHandle) PURE;
  1280. STDMETHOD(Load)(THIS_ IDirectDrawSurface7 *dst_surface, POINT *dst_point,
  1281. IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags) PURE;
  1282. STDMETHOD(LightEnable)(THIS_ DWORD dwLightIndex,WINBOOL bEnable) PURE;
  1283. STDMETHOD(GetLightEnable)(THIS_ DWORD dwLightIndex,WINBOOL *pbEnable) PURE;
  1284. STDMETHOD(SetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE;
  1285. STDMETHOD(GetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE;
  1286. STDMETHOD(GetInfo)(THIS_ DWORD info_id, void *info, DWORD info_size) PURE;
  1287. };
  1288. #undef INTERFACE
  1289. #if !defined(__cplusplus) || defined(CINTERFACE)
  1290. /*** IUnknown methods ***/
  1291. #define IDirect3DDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1292. #define IDirect3DDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1293. #define IDirect3DDevice7_Release(p) (p)->lpVtbl->Release(p)
  1294. /*** IDirect3DDevice7 methods ***/
  1295. #define IDirect3DDevice7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1296. #define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  1297. #define IDirect3DDevice7_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  1298. #define IDirect3DDevice7_EndScene(p) (p)->lpVtbl->EndScene(p)
  1299. #define IDirect3DDevice7_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  1300. #define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  1301. #define IDirect3DDevice7_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  1302. #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
  1303. #define IDirect3DDevice7_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  1304. #define IDirect3DDevice7_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  1305. #define IDirect3DDevice7_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  1306. #define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  1307. #define IDirect3DDevice7_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  1308. #define IDirect3DDevice7_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  1309. #define IDirect3DDevice7_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  1310. #define IDirect3DDevice7_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
  1311. #define IDirect3DDevice7_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b)
  1312. #define IDirect3DDevice7_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  1313. #define IDirect3DDevice7_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  1314. #define IDirect3DDevice7_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p)
  1315. #define IDirect3DDevice7_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a)
  1316. #define IDirect3DDevice7_PreLoad(p,a) (p)->lpVtbl->PreLoad(p,a)
  1317. #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  1318. #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  1319. #define IDirect3DDevice7_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  1320. #define IDirect3DDevice7_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  1321. #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
  1322. #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
  1323. #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
  1324. #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)
  1325. #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
  1326. #define IDirect3DDevice7_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
  1327. #define IDirect3DDevice7_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
  1328. #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
  1329. #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
  1330. #define IDirect3DDevice7_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
  1331. #define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a)
  1332. #define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a)
  1333. #define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a)
  1334. #define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b)
  1335. #define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->lpVtbl->Load(p,a,b,c,d,e)
  1336. #define IDirect3DDevice7_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b)
  1337. #define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b)
  1338. #define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b)
  1339. #define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b)
  1340. #define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c)
  1341. #else
  1342. /*** IUnknown methods ***/
  1343. #define IDirect3DDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1344. #define IDirect3DDevice7_AddRef(p) (p)->AddRef()
  1345. #define IDirect3DDevice7_Release(p) (p)->Release()
  1346. /*** IDirect3DDevice7 methods ***/
  1347. #define IDirect3DDevice7_GetCaps(p,a) (p)->GetCaps(a)
  1348. #define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  1349. #define IDirect3DDevice7_BeginScene(p) (p)->BeginScene()
  1350. #define IDirect3DDevice7_EndScene(p) (p)->EndScene()
  1351. #define IDirect3DDevice7_GetDirect3D(p,a) (p)->GetDirect3D(a)
  1352. #define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  1353. #define IDirect3DDevice7_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  1354. #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f)
  1355. #define IDirect3DDevice7_SetTransform(p,a,b) (p)->SetTransform(a,b)
  1356. #define IDirect3DDevice7_GetTransform(p,a,b) (p)->GetTransform(a,b)
  1357. #define IDirect3DDevice7_SetViewport(p,a) (p)->SetViewport(a)
  1358. #define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  1359. #define IDirect3DDevice7_GetViewport(p,a) (p)->GetViewport(a)
  1360. #define IDirect3DDevice7_SetMaterial(p,a) (p)->SetMaterial(a)
  1361. #define IDirect3DDevice7_GetMaterial(p,a) (p)->GetMaterial(a)
  1362. #define IDirect3DDevice7_SetLight(p,a,b) (p)->SetLight(a,b)
  1363. #define IDirect3DDevice7_GetLight(p,a,b) (p)->GetLight(a,b)
  1364. #define IDirect3DDevice7_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  1365. #define IDirect3DDevice7_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  1366. #define IDirect3DDevice7_BeginStateBlock(p) (p)->BeginStateBlock()
  1367. #define IDirect3DDevice7_EndStateBlock(p,a) (p)->EndStateBlock(a)
  1368. #define IDirect3DDevice7_PreLoad(p,a) (p)->PreLoad(a)
  1369. #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  1370. #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  1371. #define IDirect3DDevice7_SetClipStatus(p,a) (p)->SetClipStatus(a)
  1372. #define IDirect3DDevice7_GetClipStatus(p,a) (p)->GetClipStatus(a)
  1373. #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
  1374. #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
  1375. #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
  1376. #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e,f,g)
  1377. #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
  1378. #define IDirect3DDevice7_GetTexture(p,a,b) (p)->GetTexture(a,b)
  1379. #define IDirect3DDevice7_SetTexture(p,a,b) (p)->SetTexture(a,b)
  1380. #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
  1381. #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
  1382. #define IDirect3DDevice7_ValidateDevice(p,a) (p)->ValidateDevice(a)
  1383. #define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a)
  1384. #define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a)
  1385. #define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a)
  1386. #define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b)
  1387. #define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->Load(a,b,c,d,e)
  1388. #define IDirect3DDevice7_LightEnable(p,a,b) (p)->LightEnable(a,b)
  1389. #define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b)
  1390. #define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b)
  1391. #define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b)
  1392. #define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c)
  1393. #endif
  1394. /*****************************************************************************
  1395. * IDirect3DVertexBuffer interface
  1396. */
  1397. #define INTERFACE IDirect3DVertexBuffer
  1398. DECLARE_INTERFACE_(IDirect3DVertexBuffer,IUnknown)
  1399. {
  1400. /*** IUnknown methods ***/
  1401. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1402. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1403. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1404. /*** IDirect3DVertexBuffer methods ***/
  1405. STDMETHOD(Lock)(THIS_ DWORD flags, void **data, DWORD *data_size) PURE;
  1406. STDMETHOD(Unlock)(THIS) PURE;
  1407. STDMETHOD(ProcessVertices)(THIS_ DWORD vertex_op, DWORD dst_idx, DWORD count,
  1408. IDirect3DVertexBuffer *src_buffer, DWORD src_idx,
  1409. IDirect3DDevice3 *device, DWORD flags) PURE;
  1410. STDMETHOD(GetVertexBufferDesc)(THIS_ D3DVERTEXBUFFERDESC *desc) PURE;
  1411. STDMETHOD(Optimize)(THIS_ IDirect3DDevice3 *device, DWORD flags) PURE;
  1412. };
  1413. #undef INTERFACE
  1414. #if !defined(__cplusplus) || defined(CINTERFACE)
  1415. /*** IUnknown methods ***/
  1416. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1417. #define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  1418. #define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p)
  1419. /*** IDirect3DVertexBuffer methods ***/
  1420. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
  1421. #define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  1422. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
  1423. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
  1424. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
  1425. #else
  1426. /*** IUnknown methods ***/
  1427. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1428. #define IDirect3DVertexBuffer_AddRef(p) (p)->AddRef()
  1429. #define IDirect3DVertexBuffer_Release(p) (p)->Release()
  1430. /*** IDirect3DVertexBuffer methods ***/
  1431. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->Lock(a,b,c)
  1432. #define IDirect3DVertexBuffer_Unlock(p) (p)->Unlock()
  1433. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
  1434. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
  1435. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->Optimize(a,b)
  1436. #endif
  1437. /*****************************************************************************
  1438. * IDirect3DVertexBuffer7 interface
  1439. */
  1440. #define INTERFACE IDirect3DVertexBuffer7
  1441. DECLARE_INTERFACE_(IDirect3DVertexBuffer7,IUnknown)
  1442. {
  1443. /*** IUnknown methods ***/
  1444. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1445. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1446. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1447. /*** IDirect3DVertexBuffer7 methods ***/
  1448. STDMETHOD(Lock)(THIS_ DWORD flags, void **data, DWORD *data_size) PURE;
  1449. STDMETHOD(Unlock)(THIS) PURE;
  1450. STDMETHOD(ProcessVertices)(THIS_ DWORD vertex_op, DWORD dst_idx, DWORD count,
  1451. IDirect3DVertexBuffer7 *src_buffer, DWORD src_idx,
  1452. IDirect3DDevice7 *device, DWORD flags) PURE;
  1453. STDMETHOD(GetVertexBufferDesc)(THIS_ D3DVERTEXBUFFERDESC *desc) PURE;
  1454. STDMETHOD(Optimize)(THIS_ IDirect3DDevice7 *device, DWORD flags) PURE;
  1455. STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD vertex_op, DWORD dst_idx, DWORD count,
  1456. D3DDRAWPRIMITIVESTRIDEDDATA *data, DWORD fvf, IDirect3DDevice7 *device, DWORD flags) PURE;
  1457. };
  1458. #undef INTERFACE
  1459. #if !defined(__cplusplus) || defined(CINTERFACE)
  1460. /*** IUnknown methods ***/
  1461. #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1462. #define IDirect3DVertexBuffer7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1463. #define IDirect3DVertexBuffer7_Release(p) (p)->lpVtbl->Release(p)
  1464. /*** IDirect3DVertexBuffer7 methods ***/
  1465. #define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
  1466. #define IDirect3DVertexBuffer7_Unlock(p) (p)->lpVtbl->Unlock(p)
  1467. #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
  1468. #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
  1469. #define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
  1470. #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g)
  1471. #else
  1472. /*** IUnknown methods ***/
  1473. #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1474. #define IDirect3DVertexBuffer7_AddRef(p) (p)->AddRef()
  1475. #define IDirect3DVertexBuffer7_Release(p) (p)->Release()
  1476. /*** IDirect3DVertexBuffer7 methods ***/
  1477. #define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->Lock(a,b,c)
  1478. #define IDirect3DVertexBuffer7_Unlock(p) (p)->Unlock()
  1479. #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
  1480. #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
  1481. #define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->Optimize(a,b)
  1482. #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->ProcessVerticesStrided(a,b,c,d,e,f,g)
  1483. #endif
  1484. #endif /* __WINE_D3D_H */