Stop testing a sequence upon the first expected error, to avoid
[wine.git] / include / d3d9.h
blob1fa04b6d4d0ef7f9561d8824a812f73557f3cbc5
1 /*
2 * Copyright (C) 2002-2003 Jason Edmeades
3 * Raphael Junqueira
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef __WINE_D3D9_H
21 #define __WINE_D3D9_H
23 #ifndef DIRECT3D_VERSION
24 #define DIRECT3D_VERSION 0x0900
25 #endif
27 #include <objbase.h>
29 #include <d3d9types.h>
30 #include <d3d9caps.h>
32 /*****************************************************************************
33 * Behavior Flags for IDirect3D8::CreateDevice
35 #define D3DCREATE_FPU_PRESERVE 0x00000002L
36 #define D3DCREATE_MULTITHREADED 0x00000004L
37 #define D3DCREATE_PUREDEVICE 0x00000010L
38 #define D3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020L
39 #define D3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040L
40 #define D3DCREATE_MIXED_VERTEXPROCESSING 0x00000080L
41 #define D3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100L
42 #define D3DCREATE_ADAPTERGROUP_DEVICE 0x00000200L
44 /*****************************************************************************
45 * Flags for SetPrivateData
47 #define D3DSPD_IUNKNOWN 0x00000001L
50 /*****************************************************************************
51 * #defines and error codes
53 #define D3DADAPTER_DEFAULT 0
54 #define D3DENUM_NO_WHQL_LEVEL 0x00000002L
55 #define D3DPRESENT_BACK_BUFFERS_MAX 3L
56 #define D3DSGR_NO_CALIBRATION 0x00000000L
57 #define D3DSGR_CALIBRATE 0x00000001L
59 #define _FACD3D 0x876
60 #define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code )
61 #define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code )
63 /*****************************************************************************
64 * Direct3D Errors
66 #define D3D_OK S_OK
67 #define D3DERR_WRONGTEXTUREFORMAT MAKE_D3DHRESULT(2072)
68 #define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_D3DHRESULT(2073)
69 #define D3DERR_UNSUPPORTEDCOLORARG MAKE_D3DHRESULT(2074)
70 #define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_D3DHRESULT(2075)
71 #define D3DERR_UNSUPPORTEDALPHAARG MAKE_D3DHRESULT(2076)
72 #define D3DERR_TOOMANYOPERATIONS MAKE_D3DHRESULT(2077)
73 #define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_D3DHRESULT(2078)
74 #define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_D3DHRESULT(2079)
75 #define D3DERR_CONFLICTINGRENDERSTATE MAKE_D3DHRESULT(2081)
76 #define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_D3DHRESULT(2082)
77 #define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_D3DHRESULT(2086)
78 #define D3DERR_DRIVERINTERNALERROR MAKE_D3DHRESULT(2087)
79 #define D3DERR_NOTFOUND MAKE_D3DHRESULT(2150)
80 #define D3DERR_MOREDATA MAKE_D3DHRESULT(2151)
81 #define D3DERR_DEVICELOST MAKE_D3DHRESULT(2152)
82 #define D3DERR_DEVICENOTRESET MAKE_D3DHRESULT(2153)
83 #define D3DERR_NOTAVAILABLE MAKE_D3DHRESULT(2154)
84 #define D3DERR_OUTOFVIDEOMEMORY MAKE_D3DHRESULT(380)
85 #define D3DERR_INVALIDDEVICE MAKE_D3DHRESULT(2155)
86 #define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156)
87 #define D3DERR_DRIVERINVALIDCALL MAKE_D3DHRESULT(2157)
88 #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540)
89 #define D3DOK_NOAUTOGEN MAKE_D3DSTATUS(2159)
92 /*****************************************************************************
93 * Predeclare the interfaces
95 DEFINE_GUID(IID_IDirect3D9, 0x81BDCBCA, 0x64D4, 0x426D, 0xAE, 0x8D, 0xAD, 0x1, 0x47, 0xF4, 0x27, 0x5C);
96 typedef struct IDirect3D9 IDirect3D9, *LPDIRECT3D9, *PDIRECT3D9;
98 DEFINE_GUID(IID_IDirect3DDevice9, 0xd0223b96, 0xbf7a, 0x43fd, 0x92, 0xbd, 0xa4, 0x3b, 0xd, 0x82, 0xb9, 0xeb);
99 typedef struct IDirect3DDevice9 IDirect3DDevice9, *LPDIRECT3DDEVICE9;
101 DEFINE_GUID(IID_IDirect3DResource9, 0x5eec05d, 0x8f7d, 0x4362, 0xb9, 0x99, 0xd1, 0xba, 0xf3, 0x57, 0xc7, 0x4);
102 typedef struct IDirect3DResource9 IDirect3DResource9, *LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9;
104 DEFINE_GUID(IID_IDirect3DVertexBuffer9, 0xb64bb1b5, 0xfd70, 0x4df6, 0xbf, 0x91, 0x19, 0xd0, 0xa1, 0x24, 0x55, 0xe3);
105 typedef struct IDirect3DVertexBuffer9 IDirect3DVertexBuffer9, *LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEXBUFFER9;
107 DEFINE_GUID(IID_IDirect3DVolume9, 0x24f416e6, 0x1f67, 0x4aa7, 0xb8, 0x8e, 0xd3, 0x3f, 0x6f, 0x31, 0x28, 0xa1);
108 typedef struct IDirect3DVolume9 IDirect3DVolume9, *LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9;
110 DEFINE_GUID(IID_IDirect3DSwapChain9, 0x794950f2, 0xadfc, 0x458a, 0x90, 0x5e, 0x10, 0xa1, 0xb, 0xb, 0x50, 0x3b);
111 typedef struct IDirect3DSwapChain9 IDirect3DSwapChain9, *LPDIRECT3DSWAPCHAIN9, *PDIRECT3DSWAPCHAIN9;
113 DEFINE_GUID(IID_IDirect3DSurface9, 0xcfbaf3a, 0x9ff6, 0x429a, 0x99, 0xb3, 0xa2, 0x79, 0x6a, 0xf8, 0xb8, 0x9b);
114 typedef struct IDirect3DSurface9 IDirect3DSurface9, *LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9;
116 DEFINE_GUID(IID_IDirect3DIndexBuffer9, 0x7c9dd65e, 0xd3f7, 0x4529, 0xac, 0xee, 0x78, 0x58, 0x30, 0xac, 0xde, 0x35);
117 typedef struct IDirect3DIndexBuffer9 IDirect3DIndexBuffer9, *LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUFFER9;
119 DEFINE_GUID(IID_IDirect3DBaseTexture9, 0x580ca87e, 0x1d3c, 0x4d54, 0x99, 0x1d, 0xb7, 0xd3, 0xe3, 0xc2, 0x98, 0xce);
120 typedef struct IDirect3DBaseTexture9 IDirect3DBaseTexture9, *LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXTURE9;
122 DEFINE_GUID(IID_IDirect3DTexture9, 0x85c31227, 0x3de5, 0x4f00, 0x9b, 0x3a, 0xf1, 0x1a, 0xc3, 0x8c, 0x18, 0xb5);
123 typedef struct IDirect3DTexture9 IDirect3DTexture9, *LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9;
125 DEFINE_GUID(IID_IDirect3DCubeTexture9, 0xfff32f81, 0xd953, 0x473a, 0x92, 0x23, 0x93, 0xd6, 0x52, 0xab, 0xa9, 0x3f);
126 typedef struct IDirect3DCubeTexture9 IDirect3DCubeTexture9, *LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCUBETEXTURE9;
128 DEFINE_GUID(IID_IDirect3DVolumeTexture9, 0x2518526c, 0xe789, 0x4111, 0xa7, 0xb9, 0x47, 0xef, 0x32, 0x8d, 0x13, 0xe6);
129 typedef struct IDirect3DVolumeTexture9 IDirect3DVolumeTexture9, *LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLUMETEXTURE9;
131 DEFINE_GUID(IID_IDirect3DVertexDeclaration9, 0xdd13c59c, 0x36fa, 0x4098, 0xa8, 0xfb, 0xc7, 0xed, 0x39, 0xdc, 0x85, 0x46);
132 typedef struct IDirect3DVertexDeclaration9 IDirect3DVertexDeclaration9, *LPDIRECT3DVERTEXDECLARATION9;
134 DEFINE_GUID(IID_IDirect3DVertexShader9, 0xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
135 typedef struct IDirect3DVertexShader9 IDirect3DVertexShader9, *LPDIRECT3DVERTEXSHADER9;
137 DEFINE_GUID(IID_IDirect3DPixelShader9, 0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
138 typedef struct IDirect3DPixelShader9 IDirect3DPixelShader9, *LPDIRECT3DPIXELSHADER9;
140 DEFINE_GUID(IID_IDirect3DStateBlock9, 0xb07c4fe5, 0x310d, 0x4ba8, 0xa2, 0x3c, 0x4f, 0xf, 0x20, 0x6f, 0x21, 0x8b);
141 typedef struct IDirect3DStateBlock9 IDirect3DStateBlock9, *LPDIRECT3DSTATEBLOCK9;
143 DEFINE_GUID(IID_IDirect3DQuery9, 0xd9771460, 0xa695, 0x4f26, 0xbb, 0xd3, 0x27, 0xb8, 0x40, 0xb5, 0x41, 0xcc);
144 typedef struct IDirect3DQuery9 IDirect3DQuery9, *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9;
146 /*****************************************************************************
147 * IDirect3D9 interface
149 #define INTERFACE IDirect3D9
150 #define IDirect3D9_METHODS \
151 IUnknown_METHODS \
152 STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE; \
153 STDMETHOD_(UINT, GetAdapterCount)(THIS) PURE; \
154 STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) PURE; \
155 STDMETHOD_(UINT, GetAdapterModeCount)(THIS_ UINT Adapter, D3DFORMAT Format) PURE; \
156 STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) PURE; \
157 STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter, D3DDISPLAYMODE* pMode) PURE; \
158 STDMETHOD(CheckDeviceType)(THIS_ UINT iAdapter, D3DDEVTYPE DevType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed) PURE; \
159 STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) PURE; \
160 STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) PURE; \
161 STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) PURE; \
162 STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) PURE; \
163 STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) PURE; \
164 STDMETHOD_(HMONITOR, GetAdapterMonitor)(THIS_ UINT Adapter) PURE; \
165 STDMETHOD(CreateDevice)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface) PURE;
166 DECLARE_INTERFACE_(IDirect3D9,IUnknown) { IDirect3D9_METHODS };
167 #undef INTERFACE
169 #ifdef COBJMACROS
170 /*** IUnknown methods ***/
171 #define IDirect3D9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
172 #define IDirect3D9_AddRef(p) (p)->lpVtbl->AddRef(p)
173 #define IDirect3D9_Release(p) (p)->lpVtbl->Release(p)
174 /*** IDirect3D9 methods ***/
175 #define IDirect3D9_RegisterSoftwareDevice(p,a) (p)->lpVtbl->RegisterSoftwareDevice(p,a)
176 #define IDirect3D9_GetAdapterCount(p) (p)->lpVtbl->GetAdapterCount(p)
177 #define IDirect3D9_GetAdapterIdentifier(p,a,b,c) (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
178 #define IDirect3D9_GetAdapterModeCount(p,a,b) (p)->lpVtbl->GetAdapterModeCount(p,a,b)
179 #define IDirect3D9_EnumAdapterModes(p,a,b,c,d) (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
180 #define IDirect3D9_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
181 #define IDirect3D9_CheckDeviceType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e)
182 #define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f)
183 #define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
184 #define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e)
185 #define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d) (p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c,d)
186 #define IDirect3D9_GetDeviceCaps(p,a,b,c) (p)->lpVtbl->GetDeviceCaps(p,a,b,c)
187 #define IDirect3D9_GetAdapterMonitor(p,a) (p)->lpVtbl->GetAdapterMonitor(p,a)
188 #define IDirect3D9_CreateDevice(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f)
189 #endif
191 /*****************************************************************************
192 * IDirect3DDevice9 interface
194 #define INTERFACE IDirect3DDevice9
195 #define IDirect3DDevice9_METHODS \
196 IUnknown_METHODS \
197 STDMETHOD(TestCooperativeLevel)(THIS) PURE; \
198 STDMETHOD_(UINT, GetAvailableTextureMem)(THIS) PURE; \
199 STDMETHOD(EvictManagedResources)(THIS) PURE; \
200 STDMETHOD(GetDirect3D)(THIS_ IDirect3D9** ppD3D9) PURE; \
201 STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS9* pCaps) PURE; \
202 STDMETHOD(GetDisplayMode)(THIS_ UINT iSwapChain, D3DDISPLAYMODE* pMode) PURE; \
203 STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS *pParameters) PURE; \
204 STDMETHOD(SetCursorProperties)(THIS_ UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap) PURE; \
205 STDMETHOD_(void, SetCursorPosition)(THIS_ int X,int Y, DWORD Flags) PURE; \
206 STDMETHOD_(BOOL, ShowCursor)(THIS_ BOOL bShow) PURE; \
207 STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain) PURE; \
208 STDMETHOD(GetSwapChain)(THIS_ UINT iSwapChain, IDirect3DSwapChain9** pSwapChain) PURE; \
209 STDMETHOD_(UINT, GetNumberOfSwapChains)(THIS) PURE; \
210 STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE; \
211 STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion) PURE; \
212 STDMETHOD(GetBackBuffer)(THIS_ UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer) PURE; \
213 STDMETHOD(GetRasterStatus)(THIS_ UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus) PURE; \
214 STDMETHOD(SetDialogBoxMode)(THIS_ BOOL bEnableDialogs) PURE; \
215 STDMETHOD_(void, SetGammaRamp)(THIS_ UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp) PURE; \
216 STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain, D3DGAMMARAMP* pRamp) PURE; \
217 STDMETHOD(CreateTexture)(THIS_ UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle) PURE; \
218 STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle) PURE; \
219 STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle) PURE; \
220 STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle) PURE; \
221 STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle) PURE; \
222 STDMETHOD(CreateRenderTarget)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE; \
223 STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE; \
224 STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint) PURE; \
225 STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture) PURE; \
226 STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface) PURE; \
227 STDMETHOD(GetFrontBufferData)(THIS_ UINT iSwapChain, IDirect3DSurface9* pDestSurface) PURE; \
228 STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter) PURE; \
229 STDMETHOD(ColorFill)(THIS_ IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color) PURE; \
230 STDMETHOD(CreateOffscreenPlainSurface)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE; \
231 STDMETHOD(SetRenderTarget)(THIS_ DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget) PURE; \
232 STDMETHOD(GetRenderTarget)(THIS_ DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget) PURE; \
233 STDMETHOD(SetDepthStencilSurface)(THIS_ IDirect3DSurface9* pNewZStencil) PURE; \
234 STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface9** ppZStencilSurface) PURE; \
235 STDMETHOD(BeginScene)(THIS) PURE; \
236 STDMETHOD(EndScene)(THIS) PURE; \
237 STDMETHOD(Clear)(THIS_ DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) PURE; \
238 STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) PURE; \
239 STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) PURE; \
240 STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE, CONST D3DMATRIX*) PURE; \
241 STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT9* pViewport) PURE; \
242 STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT9* pViewport) PURE; \
243 STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9* pMaterial) PURE; \
244 STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL9* pMaterial) PURE; \
245 STDMETHOD(SetLight)(THIS_ DWORD Index, CONST D3DLIGHT9*) PURE; \
246 STDMETHOD(GetLight)(THIS_ DWORD Index, D3DLIGHT9*) PURE; \
247 STDMETHOD(LightEnable)(THIS_ DWORD Index, BOOL Enable) PURE; \
248 STDMETHOD(GetLightEnable)(THIS_ DWORD Index, BOOL* pEnable) PURE; \
249 STDMETHOD(SetClipPlane)(THIS_ DWORD Index, CONST float* pPlane) PURE; \
250 STDMETHOD(GetClipPlane)(THIS_ DWORD Index, float* pPlane) PURE; \
251 STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD Value) PURE; \
252 STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD* pValue) PURE; \
253 STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB) PURE; \
254 STDMETHOD(BeginStateBlock)(THIS) PURE; \
255 STDMETHOD(EndStateBlock)(THIS_ IDirect3DStateBlock9** ppSB) PURE; \
256 STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS9* pClipStatus) PURE; \
257 STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS9* pClipStatus) PURE; \
258 STDMETHOD(GetTexture)(THIS_ DWORD Stage, IDirect3DBaseTexture9** ppTexture) PURE; \
259 STDMETHOD(SetTexture)(THIS_ DWORD Stage, IDirect3DBaseTexture9* pTexture) PURE; \
260 STDMETHOD(GetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) PURE; \
261 STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) PURE; \
262 STDMETHOD(GetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue) PURE; \
263 STDMETHOD(SetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) PURE; \
264 STDMETHOD(ValidateDevice)(THIS_ DWORD* pNumPasses) PURE; \
265 STDMETHOD(SetPaletteEntries)(THIS_ UINT PaletteNumber, CONST PALETTEENTRY* pEntries) PURE; \
266 STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries) PURE; \
267 STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT PaletteNumber) PURE; \
268 STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT *PaletteNumber) PURE; \
269 STDMETHOD(SetScissorRect)(THIS_ CONST RECT* pRect) PURE; \
270 STDMETHOD(GetScissorRect)(THIS_ RECT* pRect) PURE; \
271 STDMETHOD(SetSoftwareVertexProcessing)(THIS_ BOOL bSoftware) PURE; \
272 STDMETHOD_(BOOL, GetSoftwareVertexProcessing)(THIS) PURE; \
273 STDMETHOD(SetNPatchMode)(THIS_ float nSegments) PURE; \
274 STDMETHOD_(float, GetNPatchMode)(THIS) PURE; \
275 STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) PURE; \
276 STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) PURE; \
277 STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) PURE; \
278 STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) PURE; \
279 STDMETHOD(ProcessVertices)(THIS_ UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags) PURE; \
280 STDMETHOD(CreateVertexDeclaration)(THIS_ CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl) PURE; \
281 STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9* pDecl) PURE; \
282 STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9** ppDecl) PURE; \
283 STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE; \
284 STDMETHOD(GetFVF)(THIS_ DWORD* pFVF) PURE; \
285 STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader) PURE; \
286 STDMETHOD(SetVertexShader)(THIS_ IDirect3DVertexShader9* pShader) PURE; \
287 STDMETHOD(GetVertexShader)(THIS_ IDirect3DVertexShader9** ppShader) PURE; \
288 STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) PURE; \
289 STDMETHOD(GetVertexShaderConstantF)(THIS_ UINT StartRegister, float* pConstantData, UINT Vector4fCount) PURE; \
290 STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE; \
291 STDMETHOD(GetVertexShaderConstantI)(THIS_ UINT StartRegister, int* pConstantData, UINT Vector4iCount) PURE; \
292 STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) PURE; \
293 STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT StartRegister, BOOL* pConstantData, UINT BoolCount) PURE; \
294 STDMETHOD(SetStreamSource)(THIS_ UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride) PURE; \
295 STDMETHOD(GetStreamSource)(THIS_ UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* OffsetInBytes, UINT* pStride) PURE; \
296 STDMETHOD(SetStreamSourceFreq)(THIS_ UINT StreamNumber, UINT Divider) PURE; \
297 STDMETHOD(GetStreamSourceFreq)(THIS_ UINT StreamNumber, UINT* Divider) PURE; \
298 STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer9* pIndexData) PURE; \
299 STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer9** ppIndexData) PURE; \
300 STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader) PURE; \
301 STDMETHOD(SetPixelShader)(THIS_ IDirect3DPixelShader9* pShader) PURE; \
302 STDMETHOD(GetPixelShader)(THIS_ IDirect3DPixelShader9** ppShader) PURE; \
303 STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) PURE; \
304 STDMETHOD(GetPixelShaderConstantF)(THIS_ UINT StartRegister, float* pConstantData, UINT Vector4fCount) PURE; \
305 STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE; \
306 STDMETHOD(GetPixelShaderConstantI)(THIS_ UINT StartRegister, int* pConstantData, UINT Vector4iCount) PURE; \
307 STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) PURE; \
308 STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT StartRegister, BOOL* pConstantData, UINT BoolCount) PURE; \
309 STDMETHOD(DrawRectPatch)(THIS_ UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo) PURE; \
310 STDMETHOD(DrawTriPatch)(THIS_ UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo) PURE; \
311 STDMETHOD(DeletePatch)(THIS_ UINT Handle) PURE; \
312 STDMETHOD(CreateQuery)(THIS_ D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery) PURE;
313 DECLARE_INTERFACE_(IDirect3DDevice9, IUnknown) { IDirect3DDevice9_METHODS };
314 #undef INTERFACE
316 #ifdef COBJMACROS
317 /*** IUnknown methods ***/
318 #define IDirect3DDevice9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
319 #define IDirect3DDevice9_AddRef(p) (p)->lpVtbl->AddRef(p)
320 #define IDirect3DDevice9_Release(p) (p)->lpVtbl->Release(p)
321 /*** IDirect3DDevice9 methods ***/
322 #define IDirect3DDevice9_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
323 #define IDirect3DDevice9_GetAvailableTextureMem(p) (p)->lpVtbl->GetAvailableTextureMem(p)
324 #define IDirect3DDevice9_EvictManagedResources(p) (p)->lpVtbl->EvictManagedResources(p)
325 #define IDirect3DDevice9_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
326 #define IDirect3DDevice9_GetDeviceCaps(p,a) (p)->lpVtbl->GetDeviceCaps(p,a)
327 #define IDirect3DDevice9_GetDisplayMode(p,a,b) (p)->lpVtbl->GetDisplayMode(p,a,b)
328 #define IDirect3DDevice9_GetCreationParameters(p,a) (p)->lpVtbl->GetCreationParameters(p,a)
329 #define IDirect3DDevice9_SetCursorProperties(p,a,b,c) (p)->lpVtbl->SetCursorProperties(p,a,b,c)
330 #define IDirect3DDevice9_SetCursorPosition(p,a,b,c) (p)->lpVtbl->SetCursorPosition(p,a,b,c)
331 #define IDirect3DDevice9_ShowCursor(p,a) (p)->lpVtbl->ShowCursor(p,a)
332 #define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b) (p)->lpVtbl->CreateAdditionalSwapChain(p,a,b)
333 #define IDirect3DDevice9_GetSwapChain(p,a,b) (p)->lpVtbl->GetSwapChain(p,a,b)
334 #define IDirect3DDevice9_GetNumberOfSwapChains(p) (p)->lpVtbl->GetNumberOfSwapChains(p)
335 #define IDirect3DDevice9_Reset(p,a) (p)->lpVtbl->Reset(p,a)
336 #define IDirect3DDevice9_Present(p,a,b,c,d) (p)->lpVtbl->Present(p,a,b,c,d)
337 #define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d) (p)->lpVtbl->GetBackBuffer(p,a,b,c,d)
338 #define IDirect3DDevice9_GetRasterStatus(p,a,b) (p)->lpVtbl->GetRasterStatus(p,a,b)
339 #define IDirect3DDevice9_SetDialogBoxMode(p,a) (p)->lpVtbl->SetDialogBoxMode(p,a)
340 #define IDirect3DDevice9_SetGammaRamp(p,a,b,c) (p)->lpVtbl->SetGammaRamp(p,a,b,c)
341 #define IDirect3DDevice9_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
342 #define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g,h)
343 #define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
344 #define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f,g)
345 #define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e,f)
346 #define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f) (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e,f)
347 #define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f,g,h)
348 #define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)
349 #define IDirect3DDevice9_UpdateSurface(p,a,b,c,d) (p)->lpVtbl->UpdateSurface(p,a,b,c,d)
350 #define IDirect3DDevice9_UpdateTexture(p,a,b) (p)->lpVtbl->UpdateTexture(p,a,b)
351 #define IDirect3DDevice9_GetRenderTargetData(p,a,b) (p)->lpVtbl->GetRenderTargetData(p,a,b)
352 #define IDirect3DDevice9_GetFrontBufferData(p,a,b) (p)->lpVtbl->GetFrontBufferData(p,a,b)
353 #define IDirect3DDevice9_StretchRect(p,a,b,c,d,e) (p)->lpVtbl->StretchRect(p,a,b,c,d,e)
354 #define IDirect3DDevice9_ColorFill(p,a,b,c) (p)->lpVtbl->ColorFill(p,a,b,c)
355 #define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f) (p)->lpVtbl->CreateOffscreenPlainSurface(p,a,b,c,d,e,f)
356 #define IDirect3DDevice9_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
357 #define IDirect3DDevice9_GetRenderTarget(p,a,b) (p)->lpVtbl->GetRenderTarget(p,a,b)
358 #define IDirect3DDevice9_SetDepthStencilSurface(p,a) (p)->lpVtbl->SetDepthStencilSurface(p,a)
359 #define IDirect3DDevice9_GetDepthStencilSurface(p,a) (p)->lpVtbl->GetDepthStencilSurface(p,a)
360 #define IDirect3DDevice9_BeginScene(p) (p)->lpVtbl->BeginScene(p)
361 #define IDirect3DDevice9_EndScene(p) (p)->lpVtbl->EndScene(p)
362 #define IDirect3DDevice9_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
363 #define IDirect3DDevice9_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
364 #define IDirect3DDevice9_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
365 #define IDirect3DDevice9_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
366 #define IDirect3DDevice9_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
367 #define IDirect3DDevice9_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
368 #define IDirect3DDevice9_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
369 #define IDirect3DDevice9_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
370 #define IDirect3DDevice9_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
371 #define IDirect3DDevice9_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b)
372 #define IDirect3DDevice9_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b)
373 #define IDirect3DDevice9_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b)
374 #define IDirect3DDevice9_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b)
375 #define IDirect3DDevice9_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b)
376 #define IDirect3DDevice9_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
377 #define IDirect3DDevice9_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
378 #define IDirect3DDevice9_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b)
379 #define IDirect3DDevice9_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p)
380 #define IDirect3DDevice9_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a)
381 #define IDirect3DDevice9_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
382 #define IDirect3DDevice9_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
383 #define IDirect3DDevice9_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
384 #define IDirect3DDevice9_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
385 #define IDirect3DDevice9_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
386 #define IDirect3DDevice9_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
387 #define IDirect3DDevice9_GetSamplerState(p,a,b,c) (p)->lpVtbl->GetSamplerState(p,a,b,c)
388 #define IDirect3DDevice9_SetSamplerState(p,a,b,c) (p)->lpVtbl->SetSamplerState(p,a,b,c)
389 #define IDirect3DDevice9_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
390 #define IDirect3DDevice9_SetPaletteEntries(p,a,b) (p)->lpVtbl->SetPaletteEntries(p,a,b)
391 #define IDirect3DDevice9_GetPaletteEntries(p,a,b) (p)->lpVtbl->GetPaletteEntries(p,a,b)
392 #define IDirect3DDevice9_SetCurrentTexturePalette(p,a) (p)->lpVtbl->SetCurrentTexturePalette(p,a)
393 #define IDirect3DDevice9_GetCurrentTexturePalette(p,a) (p)->lpVtbl->GetCurrentTexturePalette(p,a)
394 #define IDirect3DDevice9_SetScissorRect(p,a) (p)->lpVtbl->SetScissorRect(p,a)
395 #define IDirect3DDevice9_GetScissorRect(p,a) (p)->lpVtbl->GetScissorRect(p,a)
396 #define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a) (p)->lpVtbl->SetSoftwareVertexProcessing(p,a)
397 #define IDirect3DDevice9_GetSoftwareVertexProcessing(p) (p)->lpVtbl->GetSoftwareVertexProcessing(p)
398 #define IDirect3DDevice9_SetNPatchMode(p,a) (p)->lpVtbl->SetNPatchMode(p,a)
399 #define IDirect3DDevice9_GetNPatchMode(p) (p)->lpVtbl->GetNPatchMode(p)
400 #define IDirect3DDevice9_DrawPrimitive(p,a,b,c) (p)->lpVtbl->DrawPrimitive(p,a,b,c)
401 #define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f)
402 #define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d) (p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d)
403 #define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
404 #define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f)
405 #define IDirect3DDevice9_CreateVertexDeclaration(p,a,b) (p)->lpVtbl->CreateVertexDeclaration(p,a,b)
406 #define IDirect3DDevice9_SetVertexDeclaration(p,a) (p)->lpVtbl->SetVertexDeclaration(p,a)
407 #define IDirect3DDevice9_GetVertexDeclaration(p,a) (p)->lpVtbl->GetVertexDeclaration(p,a)
408 #define IDirect3DDevice9_SetFVF(p,a) (p)->lpVtbl->SetFVF(p,a)
409 #define IDirect3DDevice9_GetFVF(p,a) (p)->lpVtbl->GetFVF(p,a)
410 #define IDirect3DDevice9_CreateVertexShader(p,a,b) (p)->lpVtbl->CreateVertexShader(p,a,b)
411 #define IDirect3DDevice9_SetVertexShader(p,a) (p)->lpVtbl->SetVertexShader(p,a)
412 #define IDirect3DDevice9_GetVertexShader(p,a) (p)->lpVtbl->GetVertexShader(p,a)
413 #define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantF(p,a,b,c)
414 #define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstantF(p,a,b,c)
415 #define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantI(p,a,b,c)
416 #define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstantI(p,a,b,c)
417 #define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantB(p,a,b,c)
418 #define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstantB(p,a,b,c)
419 #define IDirect3DDevice9_SetStreamSource(p,a,b,c,d) (p)->lpVtbl->SetStreamSource(p,a,b,c,d)
420 #define IDirect3DDevice9_GetStreamSource(p,a,b,c,d) (p)->lpVtbl->GetStreamSource(p,a,b,c,d)
421 #define IDirect3DDevice9_SetStreamSourceFreq(p,a,b) (p)->lpVtbl->SetStreamSourceFreq(p,a,b)
422 #define IDirect3DDevice9_GetStreamSourceFreq(p,a,b) (p)->lpVtbl->GetStreamSourceFreq(p,a,b)
423 #define IDirect3DDevice9_SetIndices(p,a) (p)->lpVtbl->SetIndices(p,a)
424 #define IDirect3DDevice9_GetIndices(p,a) (p)->lpVtbl->GetIndices(p,a)
425 #define IDirect3DDevice9_CreatePixelShader(p,a,b) (p)->lpVtbl->CreatePixelShader(p,a,b)
426 #define IDirect3DDevice9_SetPixelShader(p,a) (p)->lpVtbl->SetPixelShader(p,a)
427 #define IDirect3DDevice9_GetPixelShader(p,a) (p)->lpVtbl->GetPixelShader(p,a)
428 #define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantF(p,a,b,c)
429 #define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstantF(p,a,b,c)
430 #define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantI(p,a,b,c)
431 #define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstantI(p,a,b,c)
432 #define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantB(p,a,b,c)
433 #define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstantB(p,a,b,c)
434 #define IDirect3DDevice9_DrawRectPatch(p,a,b,c) (p)->lpVtbl->DrawRectPatch(p,a,b,c)
435 #define IDirect3DDevice9_DrawTriPatch(p,a,b,c) (p)->lpVtbl->DrawTriPatch(p,a,b,c)
436 #define IDirect3DDevice9_DeletePatch(p,a) (p)->lpVtbl->DeletePatch(p,a)
437 #define IDirect3DDevice9_CreateQuery(p,a,b) (p)->lpVtbl->CreateQuery(p,a,b)
438 #endif
440 /*****************************************************************************
441 * IDirect3DVolume9 interface
443 #define INTERFACE IDirect3DVolume9
444 #define IDirect3DVolume9_METHODS \
445 IUnknown_METHODS \
446 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
447 STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE; \
448 STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE; \
449 STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; \
450 STDMETHOD(GetContainer)(THIS_ REFIID riid, void** ppContainer) PURE; \
451 STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC* pDesc) PURE; \
452 STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) PURE; \
453 STDMETHOD(UnlockBox)(THIS) PURE;
454 DECLARE_INTERFACE_(IDirect3DVolume9,IUnknown) { IDirect3DVolume9_METHODS };
455 #undef INTERFACE
457 #ifdef COBJMACROS
458 /*** IUnknown methods ***/
459 #define IDirect3DVolume9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
460 #define IDirect3DVolume9_AddRef(p) (p)->lpVtbl->AddRef(p)
461 #define IDirect3DVolume9_Release(p) (p)->lpVtbl->Release(p)
462 /*** IDirect3DVolume9 methods ***/
463 #define IDirect3DVolume9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
464 #define IDirect3DVolume9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
465 #define IDirect3DVolume9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
466 #define IDirect3DVolume9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
467 #define IDirect3DVolume9_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b)
468 #define IDirect3DVolume9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
469 #define IDirect3DVolume9_LockBox(p,a,b,c) (p)->lpVtbl->LockBox(p,a,b,c)
470 #define IDirect3DVolume9_UnlockBox(p) (p)->lpVtbl->UnlockBox(p)
471 #endif
473 /*****************************************************************************
474 * IDirect3DSwapChain9 interface
476 #define INTERFACE IDirect3DSwapChain9
477 #define IDirect3DSwapChain9_METHODS \
478 IUnknown_METHODS \
479 STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, DWORD dwFlags) PURE; \
480 STDMETHOD(GetFrontBufferData)(THIS_ IDirect3DSurface9* pDestSurface) PURE; \
481 STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer) PURE; \
482 STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS* pRasterStatus) PURE; \
483 STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE* pMode) PURE; \
484 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
485 STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE;
486 DECLARE_INTERFACE_(IDirect3DSwapChain9,IUnknown) { IDirect3DSwapChain9_METHODS };
487 #undef INTERFACE
489 #ifdef COBJMACROS
490 /*** IUnknown methods ***/
491 #define IDirect3DSwapChain9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
492 #define IDirect3DSwapChain9_AddRef(p) (p)->lpVtbl->AddRef(p)
493 #define IDirect3DSwapChain9_Release(p) (p)->lpVtbl->Release(p)
494 /*** IDirect3DSwapChain9 methods ***/
495 #define IDirect3DSwapChain9_Present(p,a,b,c,d,e) (p)->lpVtbl->Present(p,a,b,c,d,e)
496 #define IDirect3DSwapChain9_GetFrontBufferData(p,a) (p)->lpVtbl->GetFrontBufferData(p,a)
497 #define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c) (p)->lpVtbl->GetBackBuffer(p,a,b,c)
498 #define IDirect3DSwapChain9_GetRasterStatus(p,a) (p)->lpVtbl->GetRasterStatus(p,a)
499 #define IDirect3DSwapChain9_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
500 #define IDirect3DSwapChain9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
501 #define IDirect3DSwapChain9_GetPresentParameters(p,a) (p)->lpVtbl->GetPresentParameters(p,a)
502 #endif
504 /*****************************************************************************
505 * IDirect3DResource9 interface
507 #define INTERFACE IDirect3DResource9
508 #define IDirect3DResource9_METHODS \
509 IUnknown_METHODS \
510 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
511 STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE; \
512 STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE; \
513 STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; \
514 STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; \
515 STDMETHOD_(DWORD, GetPriority)(THIS) PURE; \
516 STDMETHOD_(void, PreLoad)(THIS) PURE; \
517 STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
518 DECLARE_INTERFACE_(IDirect3DResource9,IUnknown) { IDirect3DResource9_METHODS };
519 #undef INTERFACE
521 #ifdef COBJMACROS
522 /*** IUnknown methods ***/
523 #define IDirect3DResource9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
524 #define IDirect3DResource9_AddRef(p) (p)->lpVtbl->AddRef(p)
525 #define IDirect3DResource9_Release(p) (p)->lpVtbl->Release(p)
526 /*** IDirect3DResource9 methods ***/
527 #define IDirect3DResource9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
528 #define IDirect3DResource9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
529 #define IDirect3DResource9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
530 #define IDirect3DResource9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
531 #define IDirect3DResource9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
532 #define IDirect3DResource9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
533 #define IDirect3DResource9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
534 #define IDirect3DResource9_GetType(p) (p)->lpVtbl->GetType(p)
535 #endif
537 /*****************************************************************************
538 * IDirect3DSurface9 interface
540 #define INTERFACE IDirect3DSurface9
541 #define IDirect3DSurface9_METHODS \
542 IDirect3DResource9_METHODS \
543 STDMETHOD(GetContainer)(THIS_ REFIID riid, void** ppContainer) PURE; \
544 STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC* pDesc) PURE; \
545 STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE; \
546 STDMETHOD(UnlockRect)(THIS) PURE; \
547 STDMETHOD(GetDC)(THIS_ HDC* phdc) PURE; \
548 STDMETHOD(ReleaseDC)(THIS_ HDC hdc) PURE;
549 DECLARE_INTERFACE_(IDirect3DSurface9,IDirect3DResource9) { IDirect3DSurface9_METHODS };
550 #undef INTERFACE
552 #ifdef COBJMACROS
553 /*** IUnknown methods ***/
554 #define IDirect3DSurface9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
555 #define IDirect3DSurface9_AddRef(p) (p)->lpVtbl->AddRef(p)
556 #define IDirect3DSurface9_Release(p) (p)->lpVtbl->Release(p)
557 /*** IDirect3DSurface9 methods: IDirect3DResource9 ***/
558 #define IDirect3DSurface9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
559 #define IDirect3DSurface9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
560 #define IDirect3DSurface9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
561 #define IDirect3DSurface9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
562 #define IDirect3DSurface9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
563 #define IDirect3DSurface9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
564 #define IDirect3DSurface9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
565 #define IDirect3DSurface9_GetType(p) (p)->lpVtbl->GetType(p)
566 /*** IDirect3DSurface9 methods ***/
567 #define IDirect3DSurface9_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b)
568 #define IDirect3DSurface9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
569 #define IDirect3DSurface9_LockRect(p,a,b,c) (p)->lpVtbl->LockRect(p,a,b,c)
570 #define IDirect3DSurface9_UnlockRect(p) (p)->lpVtbl->UnlockRect(p)
571 #define IDirect3DSurface9_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
572 #define IDirect3DSurface9_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
573 #endif
575 /*****************************************************************************
576 * IDirect3DVertexBuffer9 interface
578 #define INTERFACE IDirect3DVertexBuffer9
579 #define IDirect3DVertexBuffer9_METHODS \
580 IDirect3DResource9_METHODS \
581 STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags) PURE; \
582 STDMETHOD(Unlock)(THIS) PURE; \
583 STDMETHOD(GetDesc)(THIS_ D3DVERTEXBUFFER_DESC* pDesc) PURE;
584 DECLARE_INTERFACE_(IDirect3DVertexBuffer9,IDirect3DResource9) { IDirect3DVertexBuffer9_METHODS };
585 #undef INTERFACE
587 #ifdef COBJMACROS
588 /*** IUnknown methods ***/
589 #define IDirect3DVertexBuffer9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
590 #define IDirect3DVertexBuffer9_AddRef(p) (p)->lpVtbl->AddRef(p)
591 #define IDirect3DVertexBuffer9_Release(p) (p)->lpVtbl->Release(p)
592 /*** IDirect3DVertexBuffer9 methods: IDirect3DResource9 ***/
593 #define IDirect3DVertexBuffer9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
594 #define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
595 #define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
596 #define IDirect3DVertexBuffer9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
597 #define IDirect3DVertexBuffer9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
598 #define IDirect3DVertexBuffer9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
599 #define IDirect3DVertexBuffer9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
600 #define IDirect3DVertexBuffer9_GetType(p) (p)->lpVtbl->GetType(p)
601 /*** IDirect3DVertexBuffer9 methods ***/
602 #define IDirect3DVertexBuffer9_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
603 #define IDirect3DVertexBuffer9_Unlock(p) (p)->lpVtbl->Unlock(p)
604 #define IDirect3DVertexBuffer9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
605 #endif
607 /*****************************************************************************
608 * IDirect3DIndexBuffer9 interface
610 #define INTERFACE IDirect3DIndexBuffer9
611 #define IDirect3DIndexBuffer9_METHODS \
612 IDirect3DResource9_METHODS \
613 STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags) PURE; \
614 STDMETHOD(Unlock)(THIS) PURE; \
615 STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC* pDesc) PURE;
616 DECLARE_INTERFACE_(IDirect3DIndexBuffer9,IDirect3DResource9) { IDirect3DIndexBuffer9_METHODS };
617 #undef INTERFACE
619 #ifdef COBJMACROS
620 /*** IUnknown methods ***/
621 #define IDirect3DIndexBuffer9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
622 #define IDirect3DIndexBuffer9_AddRef(p) (p)->lpVtbl->AddRef(p)
623 #define IDirect3DIndexBuffer9_Release(p) (p)->lpVtbl->Release(p)
624 /*** IDirect3DIndexBuffer9 methods: IDirect3DResource9 ***/
625 #define IDirect3DIndexBuffer9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
626 #define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
627 #define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
628 #define IDirect3DIndexBuffer9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
629 #define IDirect3DIndexBuffer9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
630 #define IDirect3DIndexBuffer9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
631 #define IDirect3DIndexBuffer9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
632 #define IDirect3DIndexBuffer9_GetType(p) (p)->lpVtbl->GetType(p)
633 /*** IDirect3DIndexBuffer9 methods ***/
634 #define IDirect3DIndexBuffer9_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
635 #define IDirect3DIndexBuffer9_Unlock(p) (p)->lpVtbl->Unlock(p)
636 #define IDirect3DIndexBuffer9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
637 #endif
639 /*****************************************************************************
640 * IDirect3DBaseTexture9 interface
642 #define INTERFACE IDirect3DBaseTexture9
643 #define IDirect3DBaseTexture9_METHODS \
644 IDirect3DResource9_METHODS \
645 STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; \
646 STDMETHOD_(DWORD, GetLOD)(THIS) PURE; \
647 STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; \
648 STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE FilterType) PURE; \
649 STDMETHOD_(D3DTEXTUREFILTERTYPE, GetAutoGenFilterType)(THIS) PURE; \
650 STDMETHOD_(void, GenerateMipSubLevels)(THIS) PURE;
651 DECLARE_INTERFACE_(IDirect3DBaseTexture9,IDirect3DResource9) { IDirect3DBaseTexture9_METHODS };
652 #undef INTERFACE
654 #ifdef COBJMACROS
655 /*** IUnknown methods ***/
656 #define IDirect3DBaseTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
657 #define IDirect3DBaseTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
658 #define IDirect3DBaseTexture9_Release(p) (p)->lpVtbl->Release(p)
659 /*** IDirect3DBaseTexture9 methods: IDirect3DResource9 ***/
660 #define IDirect3DBaseTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
661 #define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
662 #define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
663 #define IDirect3DBaseTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
664 #define IDirect3DBaseTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
665 #define IDirect3DBaseTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
666 #define IDirect3DBaseTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
667 #define IDirect3DBaseTexture9_GetType(p) (p)->lpVtbl->GetType(p)
668 /*** IDirect3DBaseTexture9 methods ***/
669 #define IDirect3DBaseTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
670 #define IDirect3DBaseTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
671 #define IDirect3DBaseTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
672 #define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
673 #define IDirect3DBaseTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
674 #define IDirect3DBaseTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
675 #endif
677 /*****************************************************************************
678 * IDirect3DCubeTexture9 interface
680 #define INTERFACE IDirect3DCubeTexture9
681 #define IDirect3DCubeTexture9_METHODS \
682 IDirect3DBaseTexture9_METHODS \
683 STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC* pDesc) PURE; \
684 STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level, IDirect3DSurface9** ppCubeMapSurface) PURE; \
685 STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE; \
686 STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level) PURE; \
687 STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) PURE;
688 DECLARE_INTERFACE_(IDirect3DCubeTexture9,IDirect3DBaseTexture9) { IDirect3DCubeTexture9_METHODS };
689 #undef INTERFACE
691 #ifdef COBJMACROS
692 /*** IUnknown methods ***/
693 #define IDirect3DCubeTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
694 #define IDirect3DCubeTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
695 #define IDirect3DCubeTexture9_Release(p) (p)->lpVtbl->Release(p)
696 /*** IDirect3DCubeTexture9 methods: IDirect3DResource9 ***/
697 #define IDirect3DCubeTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
698 #define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
699 #define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
700 #define IDirect3DCubeTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
701 #define IDirect3DCubeTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
702 #define IDirect3DCubeTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
703 #define IDirect3DCubeTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
704 #define IDirect3DCubeTexture9_GetType(p) (p)->lpVtbl->GetType(p)
705 /*** IDirect3DCubeTexture9 methods: IDirect3DBaseTexture9 ***/
706 #define IDirect3DCubeTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
707 #define IDirect3DCubeTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
708 #define IDirect3DCubeTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
709 #define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
710 #define IDirect3DCubeTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
711 #define IDirect3DCubeTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
712 /*** IDirect3DCubeTexture9 methods ***/
713 #define IDirect3DCubeTexture9_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b)
714 #define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c) (p)->lpVtbl->GetCubeMapSurface(p,a,b,c)
715 #define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e) (p)->lpVtbl->LockRect(p,a,b,c,d,e)
716 #define IDirect3DCubeTexture9_UnlockRect(p,a,b) (p)->lpVtbl->UnlockRect(p,a,b)
717 #define IDirect3DCubeTexture9_AddDirtyRect(p,a,b) (p)->lpVtbl->AddDirtyRect(p,a,b)
718 #endif
720 /*****************************************************************************
721 * IDirect3DTexture9 interface
723 #define INTERFACE IDirect3DTexture9
724 #define IDirect3DTexture9_METHODS \
725 IDirect3DBaseTexture9_METHODS \
726 STDMETHOD(GetLevelDesc)(THIS_ UINT Level, D3DSURFACE_DESC* pDesc) PURE; \
727 STDMETHOD(GetSurfaceLevel)(THIS_ UINT Level, IDirect3DSurface9** ppSurfaceLevel) PURE; \
728 STDMETHOD(LockRect)(THIS_ UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE; \
729 STDMETHOD(UnlockRect)(THIS_ UINT Level) PURE; \
730 STDMETHOD(AddDirtyRect)(THIS_ CONST RECT* pDirtyRect) PURE;
731 DECLARE_INTERFACE_(IDirect3DTexture9,IDirect3DBaseTexture9) { IDirect3DTexture9_METHODS };
732 #undef INTERFACE
734 #ifdef COBJMACROS
735 /*** IUnknown methods ***/
736 #define IDirect3DTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
737 #define IDirect3DTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
738 #define IDirect3DTexture9_Release(p) (p)->lpVtbl->Release(p)
739 /*** IDirect3DTexture9 methods: IDirect3DResource9 ***/
740 #define IDirect3DTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
741 #define IDirect3DTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
742 #define IDirect3DTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
743 #define IDirect3DTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
744 #define IDirect3DTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
745 #define IDirect3DTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
746 #define IDirect3DTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
747 #define IDirect3DTexture9_GetType(p) (p)->lpVtbl->GetType(p)
748 /*** IDirect3DTexture9 methods: IDirect3DBaseTexture9 ***/
749 #define IDirect3DTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
750 #define IDirect3DTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
751 #define IDirect3DTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
752 #define IDirect3DTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
753 #define IDirect3DTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
754 #define IDirect3DTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
755 /*** IDirect3DTexture9 methods ***/
756 #define IDirect3DTexture9_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b)
757 #define IDirect3DTexture9_GetSurfaceLevel(p,a,b) (p)->lpVtbl->GetSurfaceLevel(p,a,b)
758 #define IDirect3DTexture9_LockRect(p,a,b,c,d) (p)->lpVtbl->LockRect(p,a,b,c,d)
759 #define IDirect3DTexture9_UnlockRect(p,a) (p)->lpVtbl->UnlockRect(p,a)
760 #define IDirect3DTexture9_AddDirtyRect(p,a) (p)->lpVtbl->AddDirtyRect(p,a)
761 #endif
763 /*****************************************************************************
764 * IDirect3DVolumeTexture9 interface
766 #define INTERFACE IDirect3DVolumeTexture9
767 #define IDirect3DVolumeTexture9_METHODS \
768 IDirect3DBaseTexture9_METHODS \
769 STDMETHOD(GetLevelDesc)(THIS_ UINT Level, D3DVOLUME_DESC *pDesc) PURE; \
770 STDMETHOD(GetVolumeLevel)(THIS_ UINT Level, IDirect3DVolume9** ppVolumeLevel) PURE; \
771 STDMETHOD(LockBox)(THIS_ UINT Level, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) PURE; \
772 STDMETHOD(UnlockBox)(THIS_ UINT Level) PURE; \
773 STDMETHOD(AddDirtyBox)(THIS_ CONST D3DBOX* pDirtyBox) PURE;
774 DECLARE_INTERFACE_(IDirect3DVolumeTexture9,IDirect3DBaseTexture9) { IDirect3DVolumeTexture9_METHODS };
775 #undef INTERFACE
777 #ifdef COBJMACROS
778 /*** IUnknown methods ***/
779 #define IDirect3DVolumeTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
780 #define IDirect3DVolumeTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
781 #define IDirect3DVolumeTexture9_Release(p) (p)->lpVtbl->Release(p)
782 /*** IDirect3DVolumeTexture9 methods: IDirect3DResource9 ***/
783 #define IDirect3DVolumeTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
784 #define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
785 #define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
786 #define IDirect3DVolumeTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
787 #define IDirect3DVolumeTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
788 #define IDirect3DVolumeTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
789 #define IDirect3DVolumeTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
790 #define IDirect3DVolumeTexture9_GetType(p) (p)->lpVtbl->GetType(p)
791 /*** IDirect3DVolumeTexture9 methods: IDirect3DBaseTexture9 ***/
792 #define IDirect3DVolumeTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
793 #define IDirect3DVolumeTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
794 #define IDirect3DVolumeTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
795 #define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
796 #define IDirect3DVolumeTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
797 #define IDirect3DVolumeTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
798 /*** IDirect3DVolumeTexture9 methods ***/
799 #define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b)
800 #define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b) (p)->lpVtbl->GetVolumeLevel(p,a,b)
801 #define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d) (p)->lpVtbl->LockBox(p,a,b,c,d)
802 #define IDirect3DVolumeTexture9_UnlockBox(p,a) (p)->lpVtbl->UnlockBox(p,a)
803 #define IDirect3DVolumeTexture9_AddDirtyBox(p,a) (p)->lpVtbl->AddDirtyBox(p,a)
804 #endif
806 /*****************************************************************************
807 * IDirect3DVertexDeclaration9 interface
809 #define INTERFACE IDirect3DVertexDeclaration9
810 #define IDirect3DVertexDeclaration9_METHODS \
811 IUnknown_METHODS \
812 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
813 STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9*, UINT* pNumElements) PURE;
814 DECLARE_INTERFACE_(IDirect3DVertexDeclaration9, IUnknown) { IDirect3DVertexDeclaration9_METHODS };
815 #undef INTERFACE
817 #ifdef COBJMACROS
818 /*** IUnknown methods ***/
819 #define IDirect3DVertexDeclaration9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
820 #define IDirect3DVertexDeclaration9_AddRef(p) (p)->lpVtbl->AddRef(p)
821 #define IDirect3DVertexDeclaration9_Release(p) (p)->lpVtbl->Release(p)
822 /*** IDirect3DVertexShader9 methods ***/
823 #define IDirect3DVertexDeclaration9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
824 #define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b) (p)->lpVtbl->GetDeclaration(p,a,b)
825 #endif
827 /*****************************************************************************
828 * IDirect3DVertexShader9 interface
830 #define INTERFACE IDirect3DVertexShader9
831 #define IDirect3DVertexShader9_METHODS \
832 IUnknown_METHODS \
833 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
834 STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
835 DECLARE_INTERFACE_(IDirect3DVertexShader9,IUnknown) { IDirect3DVertexShader9_METHODS };
836 #undef INTERFACE
838 #ifdef COBJMACROS
839 /*** IUnknown methods ***/
840 #define IDirect3DVertexShader9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
841 #define IDirect3DVertexShader9_AddRef(p) (p)->lpVtbl->AddRef(p)
842 #define IDirect3DVertexShader9_Release(p) (p)->lpVtbl->Release(p)
843 /*** IDirect3DVertexShader9 methods ***/
844 #define IDirect3DVertexShader9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
845 #define IDirect3DVertexShader9_GetFunction(p,a,b) (p)->lpVtbl->GetFunction(p,a,b)
846 #endif
848 /*****************************************************************************
849 * IDirect3DPixelShader9 interface
851 #define INTERFACE IDirect3DPixelShader9
852 #define IDirect3DPixelShader9_METHODS \
853 IUnknown_METHODS \
854 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
855 STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
856 DECLARE_INTERFACE_(IDirect3DPixelShader9,IUnknown) { IDirect3DPixelShader9_METHODS };
857 #undef INTERFACE
859 #ifdef COBJMACROS
860 /*** IUnknown methods ***/
861 #define IDirect3DPixelShader9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
862 #define IDirect3DPixelShader9_AddRef(p) (p)->lpVtbl->AddRef(p)
863 #define IDirect3DPixelShader9_Release(p) (p)->lpVtbl->Release(p)
864 /*** IDirect3DPixelShader9 methods ***/
865 #define IDirect3DPixelShader9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
866 #define IDirect3DPixelShader9_GetFunction(p,a,b) (p)->lpVtbl->GetFunction(p,a,b)
867 #endif
869 /*****************************************************************************
870 * IDirect3DStateBlock9 interface
872 #define INTERFACE IDirect3DStateBlock9
873 #define IDirect3DStateBlock9_METHODS \
874 IUnknown_METHODS \
875 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
876 STDMETHOD(Capture)(THIS) PURE; \
877 STDMETHOD(Apply)(THIS) PURE;
878 DECLARE_INTERFACE_(IDirect3DStateBlock9,IUnknown) { IDirect3DStateBlock9_METHODS };
879 #undef INTERFACE
881 #ifdef COBJMACROS
882 /*** IUnknown methods ***/
883 #define IDirect3DStateBlock9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
884 #define IDirect3DStateBlock9_AddRef(p) (p)->lpVtbl->AddRef(p)
885 #define IDirect3DStateBlock9_Release(p) (p)->lpVtbl->Release(p)
886 /*** IDirect3DStateBlock9 methods ***/
887 #define IDirect3DStateBlock9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
888 #define IDirect3DStateBlock9_Capture(p) (p)->lpVtbl->Capture(p)
889 #define IDirect3DStateBlock9_Apply(p) (p)->lpVtbl->Apply(p)
890 #endif
892 /*****************************************************************************
893 * IDirect3DQuery9 interface
895 #define INTERFACE IDirect3DQuery9
896 #define IDirect3DQuery9_METHODS \
897 IUnknown_METHODS \
898 STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE; \
899 STDMETHOD_(D3DQUERYTYPE, GetType)(THIS) PURE; \
900 STDMETHOD_(DWORD, GetDataSize)(THIS) PURE; \
901 STDMETHOD(Issue)(THIS_ DWORD dwIssueFlags) PURE; \
902 STDMETHOD(GetData)(THIS_ void* pData, DWORD dwSize, DWORD dwGetDataFlags) PURE;
903 DECLARE_INTERFACE_(IDirect3DQuery9,IUnknown) { IDirect3DQuery9_METHODS };
904 #undef INTERFACE
906 #ifdef COBJMACROS
907 /*** IUnknown methods ***/
908 #define IDirect3DQuery9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
909 #define IDirect3DQuery9_AddRef(p) (p)->lpVtbl->AddRef(p)
910 #define IDirect3DQuery9_Release(p) (p)->lpVtbl->Release(p)
911 /*** IDirect3DQuery9 ***/
912 #define IDirect3DQuery9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
913 #define IDirect3DQuery9_GetType(p) (p)->lpVtbl->GetType(p)
914 #define IDirect3DQuery9_GetDataSize(p) (p)->lpVtbl->GetDataSize(p)
915 #define IDirect3DQuery9_Issue(p,a) (p)->lpVtbl->Issue(p,a)
916 #define IDirect3DQuery9_GetData(p,a,b,c) (p)->lpVtbl->GetData(p,a,b,c)
917 #endif
919 #ifdef __cplusplus
920 extern "C" {
921 #endif /* defined(__cplusplus) */
923 /* Define the main entrypoint as well */
924 IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
926 #ifdef __cplusplus
927 } /* extern "C" */
928 #endif /* defined(__cplusplus) */
931 #endif /* __WINE_D3D9_H */