1 /*==========================================================================;
2 *
3 * Copyright (C) Microsoft Corporation. All Rights Reserved.
4 *
5 * File: d3d9.h
6 * Content: Direct3D include file
7 *
8 ****************************************************************************/
9 module win32.directx.d3d9;
10 version(Windows):
11
12 import win32.windows;
13 public import win32.directx.d3d9types;
14 public import win32.directx.d3d9caps;
15
16 const DIRECT3D_VERSION = 0x0900;
17
18 /**This identifier is passed to Direct3DCreate9 in order to ensure that an
19 * application was built against the correct header files. This number is
20 * incremented whenever a header (or other) change would require applications
21 * to be rebuilt. If the version doesn't match, Direct3DCreate9 will fail.
22 * (The number itself has no meaning.)*/
23
24 debug {
25 const D3D_SDK_VERSION = (32 | 0x80000000);
26 const D3D9b_SDK_VERSION = (31 | 0x80000000);
27 }
28 else {
29 const D3D_SDK_VERSION = 32;
30 const D3D9b_SDK_VERSION = 31;
31 }
32
33 /* IID_IDirect3D9 */
34 /* {81BDCBCA-64D4-426d-AE8D-AD0147F4275C} */
35 extern (C) const GUID IID_IDirect3D9 = { 0x81bdcbca, 0x64d4, 0x426d, [0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c] };
36
37 /* IID_IDirect3DDevice9 */
38 // {D0223B96-BF7A-43fd-92BD-A43B0D82B9EB} */
39 extern (C) const GUID IID_IDirect3DDevice9 = { 0xd0223b96, 0xbf7a, 0x43fd, [0x92, 0xbd, 0xa4, 0x3b, 0xd, 0x82, 0xb9, 0xeb] };
40
41 /* IID_IDirect3DResource9 */
42 // {05EEC05D-8F7D-4362-B999-D1BAF357C704}
43 extern (C) const GUID IID_IDirect3DResource9 = { 0x05eec05d, 0x8f7d, 0x4362, [0xb9, 0x99, 0xd1, 0xba, 0xf3, 0x57, 0xc7, 0x04] };
44
45 /* IID_IDirect3DBaseTexture9 */
46 /* {580CA87E-1D3C-4d54-991D-B7D3E3C298CE} */
47 extern (C) const GUID IID_IDirect3DBaseTexture9 = { 0x580ca87e, 0x1d3c, 0x4d54, [0x99, 0x1d, 0xb7, 0xd3, 0xe3, 0xc2, 0x98, 0xce] };
48
49 /* IID_IDirect3DTexture9 */
50 /* {85C31227-3DE5-4f00-9B3A-F11AC38C18B5} */
51 extern (C) const GUID IID_IDirect3DTexture9 = { 0x85c31227, 0x3de5, 0x4f00, [0x9b, 0x3a, 0xf1, 0x1a, 0xc3, 0x8c, 0x18, 0xb5] };
52
53 /* IID_IDirect3DCubeTexture9 */
54 /* {FFF32F81-D953-473a-9223-93D652ABA93F} */
55 extern (C) const GUID IID_IDirect3DCubeTexture9 = { 0xfff32f81, 0xd953, 0x473a, [0x92, 0x23, 0x93, 0xd6, 0x52, 0xab, 0xa9, 0x3f] };
56
57 /* IID_IDirect3DVolumeTexture9 */
58 /* {2518526C-E789-4111-A7B9-47EF328D13E6} */
59 extern (C) const GUID IID_IDirect3DVolumeTexture9 = { 0x2518526c, 0xe789, 0x4111, [0xa7, 0xb9, 0x47, 0xef, 0x32, 0x8d, 0x13, 0xe6] };
60
61 /* IID_IDirect3DVertexBuffer9 */
62 /* {B64BB1B5-FD70-4df6-BF91-19D0A12455E3} */
63 extern (C) const GUID IID_IDirect3DVertexBuffer9 = { 0xb64bb1b5, 0xfd70, 0x4df6, [0xbf, 0x91, 0x19, 0xd0, 0xa1, 0x24, 0x55, 0xe3] };
64
65 /* IID_IDirect3DIndexBuffer9 */
66 /* {7C9DD65E-D3F7-4529-ACEE-785830ACDE35} */
67 extern (C) const GUID IID_IDirect3DIndexBuffer9 = { 0x7c9dd65e, 0xd3f7, 0x4529, [0xac, 0xee, 0x78, 0x58, 0x30, 0xac, 0xde, 0x35] };
68
69 /* IID_IDirect3DSurface9 */
70 /* {0CFBAF3A-9FF6-429a-99B3-A2796AF8B89B} */
71 extern (C) const GUID IID_IDirect3DSurface9 = { 0xcfbaf3a, 0x9ff6, 0x429a, [0x99, 0xb3, 0xa2, 0x79, 0x6a, 0xf8, 0xb8, 0x9b] };
72
73 /* IID_IDirect3DVolume9 */
74 /* {24F416E6-1F67-4aa7-B88E-D33F6F3128A1} */
75 extern (C) const GUID IID_IDirect3DVolume9 = { 0x24f416e6, 0x1f67, 0x4aa7, [0xb8, 0x8e, 0xd3, 0x3f, 0x6f, 0x31, 0x28, 0xa1] };
76
77 /* IID_IDirect3DSwapChain9 */
78 /* {794950F2-ADFC-458a-905E-10A10B0B503B} */
79 extern (C) const GUID IID_IDirect3DSwapChain9 = { 0x794950f2, 0xadfc, 0x458a, [0x90, 0x5e, 0x10, 0xa1, 0xb, 0xb, 0x50, 0x3b] };
80
81 /* IID_IDirect3DVertexDeclaration9 */
82 /* {DD13C59C-36FA-4098-A8FB-C7ED39DC8546} */
83 extern (C) const GUID IID_IDirect3DVertexDeclaration9 = { 0xdd13c59c, 0x36fa, 0x4098, [0xa8, 0xfb, 0xc7, 0xed, 0x39, 0xdc, 0x85, 0x46] };
84
85 /* IID_IDirect3DVertexShader9 */
86 /* {EFC5557E-6265-4613-8A94-43857889EB36} */
87 extern (C) const GUID IID_IDirect3DVertexShader9 = { 0xefc5557e, 0x6265, 0x4613, [0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36] };
88
89 /* IID_IDirect3DPixelShader9 */
90 /* {6D3BDBDC-5B02-4415-B852-CE5E8BCCB289} */
91 extern (C) const GUID IID_IDirect3DPixelShader9 = { 0x6d3bdbdc, 0x5b02, 0x4415, [0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89] };
92
93 /* IID_IDirect3DStateBlock9 */
94 /* {B07C4FE5-310D-4ba8-A23C-4F0F206F218B} */
95 extern (C) const GUID IID_IDirect3DStateBlock9 = { 0xb07c4fe5, 0x310d, 0x4ba8, [0xa2, 0x3c, 0x4f, 0xf, 0x20, 0x6f, 0x21, 0x8b] };
96
97 /* IID_IDirect3DQuery9 */
98 /* {d9771460-a695-4f26-bbd3-27b840b541cc} */
99 extern (C) const GUID IID_IDirect3DQuery9 = { 0xd9771460, 0xa695, 0x4f26, [0xbb, 0xd3, 0x27, 0xb8, 0x40, 0xb5, 0x41, 0xcc] };
100
101
102 /* IID_HelperName */
103 /* {E4A36723-FDFE-4b22-B146-3C04C07F4CC8} */
104 extern (C) const GUID IID_HelperName = { 0xe4a36723, 0xfdfe, 0x4b22, [0xb1, 0x46, 0x3c, 0x4, 0xc0, 0x7f, 0x4c, 0xc8] };
105
106 /* IID_IDirect3D9Ex */
107 /* {02177241-69FC-400C-8FF1-93A44DF6861D} */
108 extern (C) const GUID IID_IDirect3D9Ex = { 0x02177241, 0x69FC, 0x400C, [0x8F, 0xF1, 0x93, 0xA4, 0x4D, 0xF6, 0x86, 0x1D] };
109
110 /* IID_IDirect3DDevice9Ex */
111 // {B18B10CE-2649-405a-870F-95F777D4313A}
112 extern (C) const GUID IID_IDirect3DDevice9Ex = { 0xb18b10ce, 0x2649, 0x405a, [0x87, 0xf, 0x95, 0xf7, 0x77, 0xd4, 0x31, 0x3a] };
113
114 /* IID_IDirect3DSwapChain9Ex */
115 /* {91886CAF-1C3D-4d2e-A0AB-3E4C7D8D3303} */
116 extern (C) const GUID IID_IDirect3DSwapChain9Ex = { 0x91886caf, 0x1c3d, 0x4d2e, [0xa0, 0xab, 0x3e, 0x4c, 0x7d, 0x8d, 0x33, 0x03] };
117
118
119
120 extern (C):
121 /**
122 * DLL Function for creating a Direct3D9 object. This object supports
123 * enumeration and allows the creation of Direct3DDevice9 objects.
124 * Pass the value of the constant D3D_SDK_VERSION to this function, so
125 * that the run-time can validate that your application was compiled
126 * against the right headers.
127 */
128
129 extern (Windows) LPDIRECT3D9 Direct3DCreate9(UINT SDKVersion);
130
131 /**
132 * Stubs for graphics profiling.
133 */
134 extern (Windows) int D3DPERF_BeginEvent( D3DCOLOR col, LPCWSTR wszName );
135 extern (Windows) int D3DPERF_EndEvent();
136 extern (Windows) void D3DPERF_SetMarker( D3DCOLOR col, LPCWSTR wszName );
137 extern (Windows) void D3DPERF_SetRegion( D3DCOLOR col, LPCWSTR wszName );
138 extern (Windows) BOOL D3DPERF_QueryRepeatFrame();
139
140 extern (Windows) void D3DPERF_SetOptions( DWORD dwOptions );
141 extern (Windows) DWORD D3DPERF_GetStatus();
142
143
144 interface LPDIRECT3D9 : IUnknown
145 {
146 HRESULT RegisterSoftwareDevice(void* pInitializeFunction);
147 UINT GetAdapterCount();
148 HRESULT GetAdapterIdentifier( UINT Adapter,DWORD Flags,D3DADAPTER_IDENTIFIER9* pIdentifier);
149 UINT GetAdapterModeCount(UINT Adapter,D3DFORMAT Format);
150 HRESULT EnumAdapterModes( UINT Adapter,D3DFORMAT Format,UINT Mode,D3DDISPLAYMODE* pMode);
151 HRESULT GetAdapterDisplayMode( UINT Adapter,D3DDISPLAYMODE* pMode);
152 HRESULT CheckDeviceType( UINT Adapter,D3DDEVTYPE DevType,D3DFORMAT AdapterFormat,D3DFORMAT BackBufferFormat,BOOL bWindowed);
153 HRESULT CheckDeviceFormat( UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT AdapterFormat,DWORD Usage,D3DRESOURCETYPE RType,D3DFORMAT CheckFormat);
154 HRESULT CheckDeviceMultiSampleType( UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT SurfaceFormat,BOOL Windowed,D3DMULTISAMPLE_TYPE MultiSampleType,DWORD* pQualityLevels);
155 HRESULT CheckDepthStencilMatch( UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT AdapterFormat,D3DFORMAT RenderTargetFormat,D3DFORMAT DepthStencilFormat);
156 HRESULT CheckDeviceFormatConversion( UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT SourceFormat,D3DFORMAT TargetFormat);
157 HRESULT GetDeviceCaps( UINT Adapter,D3DDEVTYPE DeviceType,D3DCAPS9* pCaps);
158 HMONITOR GetAdapterMonitor(UINT Adapter);
159 HRESULT CreateDevice( UINT Adapter,D3DDEVTYPE DeviceType,HWND hFocusWindow,DWORD BehaviorFlags,D3DPRESENT_PARAMETERS* pPresentationParameters,LPDIRECT3DDEVICE9* ppReturnedDeviceInterface);
160 /*
161 debug {
162 LPCWSTR Version;
163 }
164 */
165 }
166 alias LPDIRECT3D9 IDirect3D9;
167
168 interface LPDIRECT3DDEVICE9 : IUnknown
169 {
170 HRESULT TestCooperativeLevel();
171 UINT GetAvailableTextureMem();
172 HRESULT EvictManagedResources();
173 HRESULT GetDirect3D( LPDIRECT3D9* ppD3D9);
174 HRESULT GetDeviceCaps( D3DCAPS9* pCaps);
175 HRESULT GetDisplayMode( UINT iSwapChain,D3DDISPLAYMODE* pMode);
176 HRESULT GetCreationParameters( D3DDEVICE_CREATION_PARAMETERS *pParameters);
177 HRESULT SetCursorProperties( UINT XHotSpot,UINT YHotSpot,LPDIRECT3DSURFACE9 pCursorBitmap);
178 void SetCursorPosition(int X,int Y,DWORD Flags);
179 BOOL ShowCursor(BOOL bShow);
180 HRESULT CreateAdditionalSwapChain( D3DPRESENT_PARAMETERS* pPresentationParameters,LPDIRECT3DSWAPCHAIN9* pSwapChain);
181 HRESULT GetSwapChain( UINT iSwapChain,LPDIRECT3DSWAPCHAIN9* pSwapChain);
182 UINT GetNumberOfSwapChains();
183 HRESULT Reset( D3DPRESENT_PARAMETERS* pPresentationParameters);
184 HRESULT Present(RECT* pSourceRect,RECT* pDestRect,HWND hDestWindowOverride, RGNDATA* pDirtyRegion);
185 HRESULT GetBackBuffer( UINT iSwapChain,UINT iBackBuffer,D3DBACKBUFFER_TYPE Type,LPDIRECT3DSURFACE9* ppBackBuffer);
186 HRESULT GetRasterStatus( UINT iSwapChain,D3DRASTER_STATUS* pRasterStatus);
187 HRESULT SetDialogBoxMode( BOOL bEnableDialogs);
188 void SetGammaRamp(UINT iSwapChain,DWORD Flags, D3DGAMMARAMP* pRamp);
189 void GetGammaRamp(UINT iSwapChain,D3DGAMMARAMP* pRamp);
190 HRESULT CreateTexture( UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,LPDIRECT3DTEXTURE9* ppTexture,HANDLE* pSharedHandle);
191 HRESULT CreateVolumeTexture( UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture,HANDLE* pSharedHandle);
192 HRESULT CreateCubeTexture( UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,LPDIRECT3DCUBETEXTURE9* ppCubeTexture,HANDLE* pSharedHandle);
193 HRESULT CreateVertexBuffer( UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,LPDIRECT3DVERTEXBUFFER9* ppVertexBuffer,HANDLE* pSharedHandle);
194 HRESULT CreateIndexBuffer( UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,LPDIRECT3DINDEXBUFFER9* ppIndexBuffer,HANDLE* pSharedHandle);
195 HRESULT CreateRenderTarget( UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,LPDIRECT3DSURFACE9* ppSurface,HANDLE* pSharedHandle);
196 HRESULT CreateDepthStencilSurface( UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,LPDIRECT3DSURFACE9* ppSurface,HANDLE* pSharedHandle);
197 HRESULT UpdateSurface( LPDIRECT3DSURFACE9 pSourceSurface, RECT* pSourceRect,LPDIRECT3DSURFACE9 pDestinationSurface, POINT* pDestPoint);
198 HRESULT UpdateTexture( LPDIRECT3DBASETEXTURE9 pSourceTexture,LPDIRECT3DBASETEXTURE9 pDestinationTexture);
199 HRESULT GetRenderTargetData( LPDIRECT3DSURFACE9 pRenderTarget,LPDIRECT3DSURFACE9 pDestSurface);
200 HRESULT GetFrontBufferData( UINT iSwapChain,LPDIRECT3DSURFACE9 pDestSurface);
201 HRESULT StretchRect( LPDIRECT3DSURFACE9 pSourceSurface, RECT* pSourceRect,LPDIRECT3DSURFACE9 pDestSurface, RECT* pDestRect,D3DTEXTUREFILTERTYPE Filter);
202 HRESULT ColorFill( LPDIRECT3DSURFACE9 pSurface, RECT* pRect,D3DCOLOR color);
203 HRESULT CreateOffscreenPlainSurface( UINT Width,UINT Height,D3DFORMAT Format,D3DPOOL Pool,LPDIRECT3DSURFACE9* ppSurface,HANDLE* pSharedHandle);
204 HRESULT SetRenderTarget( DWORD RenderTargetIndex,LPDIRECT3DSURFACE9 pRenderTarget);
205 HRESULT GetRenderTarget( DWORD RenderTargetIndex,LPDIRECT3DSURFACE9* ppRenderTarget);
206 HRESULT SetDepthStencilSurface( LPDIRECT3DSURFACE9 pNewZStencil);
207 HRESULT GetDepthStencilSurface( LPDIRECT3DSURFACE9* ppZStencilSurface);
208 HRESULT BeginScene();
209 HRESULT EndScene();
210 HRESULT Clear( DWORD Count, D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil);
211 HRESULT SetTransform( D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix);
212 HRESULT GetTransform( D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix);
213 HRESULT MultiplyTransform( D3DTRANSFORMSTATETYPE, D3DMATRIX*);
214 HRESULT SetViewport( D3DVIEWPORT9* pViewport);
215 HRESULT GetViewport( D3DVIEWPORT9* pViewport);
216 HRESULT SetMaterial( D3DMATERIAL9* pMaterial);
217 HRESULT GetMaterial( D3DMATERIAL9* pMaterial);
218 HRESULT SetLight( DWORD Index, D3DLIGHT9*);
219 HRESULT GetLight( DWORD Index,D3DLIGHT9*);
220 HRESULT LightEnable( DWORD Index,BOOL Enable);
221 HRESULT GetLightEnable( DWORD Index,BOOL* pEnable);
222 HRESULT SetClipPlane( DWORD Index, float* pPlane);
223 HRESULT GetClipPlane( DWORD Index,float* pPlane);
224 HRESULT SetRenderState( D3DRENDERSTATETYPE State,DWORD Value);
225 HRESULT GetRenderState( D3DRENDERSTATETYPE State,DWORD* pValue);
226 HRESULT CreateStateBlock( D3DSTATEBLOCKTYPE Type,LPDIRECT3DSTATEBLOCK9* ppSB);
227 HRESULT BeginStateBlock();
228 HRESULT EndStateBlock( LPDIRECT3DSTATEBLOCK9* ppSB);
229 HRESULT SetClipStatus( D3DCLIPSTATUS9* pClipStatus);
230 HRESULT GetClipStatus( D3DCLIPSTATUS9* pClipStatus);
231 HRESULT GetTexture( DWORD Stage,LPDIRECT3DBASETEXTURE9* ppTexture);
232 HRESULT SetTexture( DWORD Stage,LPDIRECT3DBASETEXTURE9 pTexture);
233 HRESULT GetTextureStageState( DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue);
234 HRESULT SetTextureStageState( DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value);
235 HRESULT GetSamplerState( DWORD Sampler,D3DSAMPLERSTATETYPE Type,DWORD* pValue);
236 HRESULT SetSamplerState( DWORD Sampler,D3DSAMPLERSTATETYPE Type,DWORD Value);
237 HRESULT ValidateDevice( DWORD* pNumPasses);
238 HRESULT SetPaletteEntries( UINT PaletteNumber, PALETTEENTRY* pEntries);
239 HRESULT GetPaletteEntries( UINT PaletteNumber,PALETTEENTRY* pEntries);
240 HRESULT SetCurrentTexturePalette( UINT PaletteNumber);
241 HRESULT GetCurrentTexturePalette( UINT *PaletteNumber);
242 HRESULT SetScissorRect( RECT* pRect);
243 HRESULT GetScissorRect( RECT* pRect);
244 HRESULT SetSoftwareVertexProcessing( BOOL bSoftware);
245 BOOL GetSoftwareVertexProcessing();
246 HRESULT SetNPatchMode( float nSegments);
247 float GetNPatchMode();
248 HRESULT DrawPrimitive( D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount);
249 HRESULT DrawIndexedPrimitive( D3DPRIMITIVETYPE,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount);
250 HRESULT DrawPrimitiveUP( D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount, void* pVertexStreamZeroData,UINT VertexStreamZeroStride);
251 HRESULT DrawIndexedPrimitiveUP( D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertices,UINT PrimitiveCount, void* pIndexData,D3DFORMAT IndexDataFormat, void* pVertexStreamZeroData,UINT VertexStreamZeroStride);
252 HRESULT ProcessVertices( UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,LPDIRECT3DVERTEXBUFFER9 pDestBuffer,LPDIRECT3DVERTEXDECLARATION9 pVertexDecl,DWORD Flags);
253 HRESULT CreateVertexDeclaration( D3DVERTEXELEMENT9* pVertexElements,LPDIRECT3DVERTEXDECLARATION9* ppDecl);
254 HRESULT SetVertexDeclaration(LPDIRECT3DVERTEXDECLARATION9 pDecl);
255 HRESULT GetVertexDeclaration(LPDIRECT3DVERTEXDECLARATION9* ppDecl);
256 HRESULT SetFVF( DWORD FVF);
257 HRESULT GetFVF( DWORD* pFVF);
258 HRESULT CreateVertexShader( DWORD* pFunction,LPDIRECT3DVERTEXSHADER9* ppShader);
259 HRESULT SetVertexShader( LPDIRECT3DVERTEXSHADER9 pShader);
260 HRESULT GetVertexShader( LPDIRECT3DVERTEXSHADER9* ppShader);
261 HRESULT SetVertexShaderConstantF( UINT StartRegister, float* pConstantData,UINT Vector4fCount);
262 HRESULT GetVertexShaderConstantF( UINT StartRegister,float* pConstantData,UINT Vector4fCount);
263 HRESULT SetVertexShaderConstantI( UINT StartRegister, int* pConstantData,UINT Vector4iCount);
264 HRESULT GetVertexShaderConstantI( UINT StartRegister,int* pConstantData,UINT Vector4iCount);
265 HRESULT SetVertexShaderConstantB( UINT StartRegister, BOOL* pConstantData,UINT BoolCount);
266 HRESULT GetVertexShaderConstantB( UINT StartRegister,BOOL* pConstantData,UINT BoolCount);
267 HRESULT SetStreamSource( UINT StreamNumber,LPDIRECT3DVERTEXBUFFER9 pStreamData,UINT OffsetInBytes,UINT Stride);
268 HRESULT GetStreamSource( UINT StreamNumber,LPDIRECT3DVERTEXBUFFER9* ppStreamData,UINT* pOffsetInBytes,UINT* pStride);
269 HRESULT SetStreamSourceFreq( UINT StreamNumber,UINT Setting);
270 HRESULT GetStreamSourceFreq( UINT StreamNumber,UINT* pSetting);
271 HRESULT SetIndices( LPDIRECT3DINDEXBUFFER9 pIndexData);
272 HRESULT GetIndices( LPDIRECT3DINDEXBUFFER9* ppIndexData);
273 HRESULT CreatePixelShader( DWORD* pFunction,LPDIRECT3DPIXELSHADER9* ppShader);
274 HRESULT SetPixelShader(LPDIRECT3DPIXELSHADER9 pShader);
275 HRESULT GetPixelShader(LPDIRECT3DPIXELSHADER9* ppShader);
276 HRESULT SetPixelShaderConstantF( UINT StartRegister, float* pConstantData,UINT Vector4fCount);
277 HRESULT GetPixelShaderConstantF( UINT StartRegister,float* pConstantData,UINT Vector4fCount);
278 HRESULT SetPixelShaderConstantI( UINT StartRegister, int* pConstantData,UINT Vector4iCount);
279 HRESULT GetPixelShaderConstantI( UINT StartRegister,int* pConstantData,UINT Vector4iCount);
280 HRESULT SetPixelShaderConstantB( UINT StartRegister, BOOL* pConstantData,UINT BoolCount);
281 HRESULT GetPixelShaderConstantB( UINT StartRegister,BOOL* pConstantData,UINT BoolCount);
282 HRESULT DrawRectPatch( UINT Handle, float* pNumSegs, D3DRECTPATCH_INFO* pRectPatchInfo);
283 HRESULT DrawTriPatch( UINT Handle, float* pNumSegs, D3DTRIPATCH_INFO* pTriPatchInfo);
284 HRESULT DeletePatch( UINT Handle);
285 HRESULT CreateQuery( D3DQUERYTYPE Type,LPDIRECT3DQUERY9* ppQuery);
286 /*
287 debug {
288 D3DDEVICE_CREATION_PARAMETERS CreationParameters;
289 D3DPRESENT_PARAMETERS PresentParameters;
290 D3DDISPLAYMODE DisplayMode;
291 D3DCAPS9 Caps;
292
293 UINT AvailableTextureMem;
294 UINT SwapChains;
295 UINT Textures;
296 UINT VertexBuffers;
297 UINT IndexBuffers;
298 UINT VertexShaders;
299 UINT PixelShaders;
300
301 D3DVIEWPORT9 Viewport;
302 D3DMATRIX ProjectionMatrix;
303 D3DMATRIX ViewMatrix;
304 D3DMATRIX WorldMatrix;
305 D3DMATRIX[8] TextureMatrices;
306
307 DWORD FVF;
308 UINT VertexSize;
309 DWORD VertexShaderVersion;
310 DWORD PixelShaderVersion;
311 BOOL SoftwareVertexProcessing;
312
313 D3DMATERIAL9 Material;
314 D3DLIGHT9[16] Lights;
315 BOOL[16] LightsEnabled;
316
317 D3DGAMMARAMP GammaRamp;
318 RECT ScissorRect;
319 BOOL DialogBoxMode;
320 }
321 */
322 }
323
324 alias LPDIRECT3DDEVICE9 IDirect3DDevice9;
325
326
327 interface LPDIRECT3DSTATEBLOCK9 : IUnknown
328 {
329 HRESULT GetDevice(LPDIRECT3DDEVICE9* ppDevice);
330 HRESULT Capture();
331 HRESULT Apply();
332 /*
333 debug {
334 LPCWSTR CreationCallStack;
335 }
336 */
337 }
338
339 alias LPDIRECT3DSTATEBLOCK9 IDirect3DStateBlock9;
340
341 interface LPDIRECT3DSWAPCHAIN9 : IUnknown
342 {
343 HRESULT Present( RECT* pSourceRect, RECT* pDestRect,HWND hDestWindowOverride, RGNDATA* pDirtyRegion,DWORD dwFlags);
344 HRESULT GetFrontBufferData( LPDIRECT3DSURFACE9 pDestSurface);
345 HRESULT GetBackBuffer( UINT iBackBuffer,D3DBACKBUFFER_TYPE Type,LPDIRECT3DSURFACE9* ppBackBuffer);
346 HRESULT GetRasterStatus( D3DRASTER_STATUS* pRasterStatus);
347 HRESULT GetDisplayMode( D3DDISPLAYMODE* pMode);
348 HRESULT GetDevice( LPDIRECT3DDEVICE9 * ppDevice);
349 HRESULT GetPresentParameters( D3DPRESENT_PARAMETERS* pPresentationParameters);
350 /*
351 debug {
352 D3DPRESENT_PARAMETERS PresentParameters;
353 D3DDISPLAYMODE DisplayMode;
354 LPCWSTR CreationCallStack;
355 }
356 */
357 }
358
359 alias LPDIRECT3DSWAPCHAIN9 IDirect3DSwapChain9;
360
361 interface LPDIRECT3DRESOURCE9 : IUnknown
362 {
363 HRESULT GetDevice( LPDIRECT3DDEVICE9* ppDevice);
364 HRESULT SetPrivateData( REFGUID refguid, void* pData,DWORD SizeOfData,DWORD Flags);
365 HRESULT GetPrivateData( REFGUID refguid,void* pData,DWORD* pSizeOfData);
366 HRESULT FreePrivateData( REFGUID refguid);
367 DWORD SetPriority(DWORD PriorityNew);
368 DWORD GetPriority();
369 void PreLoad();
370 D3DRESOURCETYPE GetType();
371 }
372
373 alias LPDIRECT3DRESOURCE9 IDirect3DResource9;
374
375 interface LPDIRECT3DVERTEXDECLARATION9 : IUnknown
376 {
377 HRESULT GetDevice( LPDIRECT3DDEVICE9* ppDevice);
378 HRESULT GetDeclaration( D3DVERTEXELEMENT9* pElement,UINT* pNumElements);
379 /*
380 debug {
381 LPCWSTR CreationCallStack;
382 }
383 */
384 }
385
386 alias LPDIRECT3DVERTEXDECLARATION9 IDirect3DVertexDeclaration9;
387
388 interface LPDIRECT3DVERTEXSHADER9 : IUnknown
389 {
390 HRESULT GetDevice( LPDIRECT3DDEVICE9 * ppDevice);
391 HRESULT GetFunction( void*,UINT* pSizeOfData);
392 /*
393 debug {
394 DWORD Version;
395 LPCWSTR CreationCallStack;
396 }
397 */
398 }
399
400 alias LPDIRECT3DVERTEXSHADER9 IDirect3DVertexShader9;
401
402 interface LPDIRECT3DPIXELSHADER9 : IUnknown
403 {
404 HRESULT GetDevice( LPDIRECT3DDEVICE9 * ppDevice);
405 HRESULT GetFunction( void*,UINT* pSizeOfData);
406 /*
407 debug {
408 DWORD Version;
409 LPCWSTR CreationCallStack;
410 }
411 */
412 }
413
414 alias LPDIRECT3DPIXELSHADER9 IDirect3DPixelShader9;
415
416 interface LPDIRECT3DBASETEXTURE9 : LPDIRECT3DRESOURCE9
417 {
418 DWORD SetLOD(DWORD LODNew);
419 DWORD GetLOD();
420 DWORD GetLevelCount();
421 HRESULT SetAutoGenFilterType( D3DTEXTUREFILTERTYPE FilterType);
422 D3DTEXTUREFILTERTYPE GetAutoGenFilterType();
423 void GenerateMipSubLevels();
424 }
425
426 alias LPDIRECT3DBASETEXTURE9 IDirect3DBaseTexture9;
427
428 interface LPDIRECT3DTEXTURE9 : LPDIRECT3DBASETEXTURE9
429 {
430 HRESULT GetLevelDesc( UINT Level,D3DSURFACE_DESC *pDesc);
431 HRESULT GetSurfaceLevel( UINT Level,LPDIRECT3DSURFACE9* ppSurfaceLevel);
432 HRESULT LockRect( UINT Level,D3DLOCKED_RECT* pLockedRect,RECT* pRect,DWORD Flags);
433 HRESULT UnlockRect( UINT Level);
434 HRESULT AddDirtyRect(RECT* pDirtyRect);
435 /*
436 debug {
437 LPCWSTR Name;
438 UINT Width;
439 UINT Height;
440 UINT Levels;
441 DWORD Usage;
442 D3DFORMAT Format;
443 D3DPOOL Pool;
444 DWORD Priority;
445 DWORD LOD;
446 D3DTEXTUREFILTERTYPE FilterType;
447 UINT LockCount;
448 LPCWSTR CreationCallStack;
449 }
450 */
451 }
452
453 alias LPDIRECT3DTEXTURE9 IDirect3DTexture9;
454
455 interface LPDIRECT3DVOLUMETEXTURE9 : LPDIRECT3DBASETEXTURE9
456 {
457 HRESULT GetLevelDesc( UINT Level,D3DVOLUME_DESC *pDesc);
458 HRESULT GetVolumeLevel( UINT Level,LPDIRECT3DVOLUME9* ppVolumeLevel);
459 HRESULT LockBox( UINT Level,D3DLOCKED_BOX* pLockedVolume, D3DBOX* pBox,DWORD Flags);
460 HRESULT UnlockBox( UINT Level);
461 HRESULT AddDirtyBox( D3DBOX* pDirtyBox);
462 /*
463 debug {
464 LPCWSTR Name;
465 UINT Width;
466 UINT Height;
467 UINT Depth;
468 UINT Levels;
469 DWORD Usage;
470 D3DFORMAT Format;
471 D3DPOOL Pool;
472 DWORD Priority;
473 DWORD LOD;
474 D3DTEXTUREFILTERTYPE FilterType;
475 UINT LockCount;
476 LPCWSTR CreationCallStack;
477 }
478 */
479 }
480
481 alias LPDIRECT3DVOLUMETEXTURE9 IDirect3DVolumeTexture9;
482
483 interface LPDIRECT3DCUBETEXTURE9 : LPDIRECT3DBASETEXTURE9
484 {
485 HRESULT GetLevelDesc( UINT Level,D3DSURFACE_DESC *pDesc);
486 HRESULT GetCubeMapSurface( D3DCUBEMAP_FACES FaceType,UINT Level,LPDIRECT3DSURFACE9* ppCubeMapSurface);
487 HRESULT LockRect( D3DCUBEMAP_FACES FaceType,UINT Level,D3DLOCKED_RECT* pLockedRect, RECT* pRect,DWORD Flags);
488 HRESULT UnlockRect( D3DCUBEMAP_FACES FaceType,UINT Level);
489 HRESULT AddDirtyRect( D3DCUBEMAP_FACES FaceType, RECT* pDirtyRect);
490 /*
491 debug {
492 LPCWSTR Name;
493 UINT Width;
494 UINT Height;
495 UINT Levels;
496 DWORD Usage;
497 D3DFORMAT Format;
498 D3DPOOL Pool;
499 DWORD Priority;
500 DWORD LOD;
501 D3DTEXTUREFILTERTYPE FilterType;
502 UINT LockCount;
503 LPCWSTR CreationCallStack;
504 }
505 */
506 }
507
508 alias LPDIRECT3DCUBETEXTURE9 IDirect3DCubeTexture9;
509
510 interface LPDIRECT3DVERTEXBUFFER9 : LPDIRECT3DRESOURCE9
511 {
512 HRESULT Lock( UINT OffsetToLock,UINT SizeToLock,void** ppbData,DWORD Flags);
513 HRESULT Unlock();
514 HRESULT GetDesc( D3DVERTEXBUFFER_DESC *pDesc);
515 /*
516 debug {
517 LPCWSTR Name;
518 UINT Length;
519 DWORD Usage;
520 DWORD FVF;
521 D3DPOOL Pool;
522 DWORD Priority;
523 UINT LockCount;
524 LPCWSTR CreationCallStack;
525 }
526 */
527 }
528
529 alias LPDIRECT3DVERTEXBUFFER9 IDirect3DVertexBuffer9;
530
531 interface LPDIRECT3DINDEXBUFFER9 : LPDIRECT3DRESOURCE9
532 {
533 HRESULT Lock( UINT OffsetToLock,UINT SizeToLock,void** ppbData,DWORD Flags);
534 HRESULT Unlock();
535 HRESULT GetDesc( D3DINDEXBUFFER_DESC *pDesc);
536 /*
537 debug {
538 LPCWSTR Name;
539 UINT Length;
540 DWORD Usage;
541 D3DFORMAT Format;
542 D3DPOOL Pool;
543 DWORD Priority;
544 UINT LockCount;
545 LPCWSTR CreationCallStack;
546 }
547 */
548 }
549
550 alias LPDIRECT3DINDEXBUFFER9 IDirect3DIndexBuffer9;
551
552 interface LPDIRECT3DSURFACE9 : LPDIRECT3DRESOURCE9
553 {
554 HRESULT GetContainer( REFIID riid,void** ppContainer);
555 HRESULT GetDesc( D3DSURFACE_DESC *pDesc);
556 HRESULT LockRect( D3DLOCKED_RECT* pLockedRect, RECT* pRect,DWORD Flags);
557 HRESULT UnlockRect();
558 HRESULT GetDC( HDC *phdc);
559 HRESULT ReleaseDC( HDC hdc);
560 /*
561 debug {
562 LPCWSTR Name;
563 UINT Width;
564 UINT Height;
565 DWORD Usage;
566 D3DFORMAT Format;
567 D3DPOOL Pool;
568 D3DMULTISAMPLE_TYPE MultiSampleType;
569 DWORD MultiSampleQuality;
570 DWORD Priority;
571 UINT LockCount;
572 UINT DCCount;
573 LPCWSTR CreationCallStack;
574 }
575 */
576 }
577
578 alias LPDIRECT3DSURFACE9 IDirect3DSurface9;
579
580 interface LPDIRECT3DVOLUME9 : IUnknown
581 {
582 HRESULT GetDevice( LPDIRECT3DDEVICE9 * ppDevice);
583 HRESULT SetPrivateData( REFGUID refguid, void* pData,DWORD SizeOfData,DWORD Flags);
584 HRESULT GetPrivateData( REFGUID refguid,void* pData,DWORD* pSizeOfData);
585 HRESULT FreePrivateData( REFGUID refguid);
586 HRESULT GetContainer( REFIID riid,void** ppContainer);
587 HRESULT GetDesc( D3DVOLUME_DESC *pDesc);
588 HRESULT LockBox( D3DLOCKED_BOX * pLockedVolume, D3DBOX* pBox,DWORD Flags);
589 HRESULT UnlockBox();
590 /*
591 debug {
592 LPCWSTR Name;
593 UINT Width;
594 UINT Height;
595 UINT Depth;
596 DWORD Usage;
597 D3DFORMAT Format;
598 D3DPOOL Pool;
599 UINT LockCount;
600 LPCWSTR CreationCallStack;
601 }
602 */
603 }
604
605 alias LPDIRECT3DVOLUME9 IDirect3DVolume9;
606
607 interface LPDIRECT3DQUERY9 : IUnknown
608 {
609 HRESULT GetDevice( LPDIRECT3DDEVICE9* ppDevice);
610 D3DQUERYTYPE GetType();
611 DWORD GetDataSize();
612 HRESULT Issue( DWORD dwIssueFlags);
613 HRESULT GetData( void* pData,DWORD dwSize,DWORD dwGetDataFlags);
614 /*
615 debug {
616 D3DQUERYTYPE Type;
617 DWORD DataSize;
618 LPCWSTR CreationCallStack;
619 }
620 */
621 }
622
623 alias LPDIRECT3DQUERY9 IDirect3DQuery9;
624
625 /****************************************************************************
626 * Flags for SetPrivateData method on all D3D9 interfaces
627 *
628 * The passed pointer is an IUnknown ptr. The SizeOfData argument to SetPrivateData
629 * must be set to sizeof(IUnknown*). Direct3D will call AddRef through this
630 * pointer and Release when the private data is destroyed. The data will be
631 * destroyed when another SetPrivateData with the same GUID is set, when
632 * FreePrivateData is called, or when the D3D9 object is freed.
633 ****************************************************************************/
634 const D3DSPD_IUNKNOWN = 0x00000001L;
635
636 /****************************************************************************
637 *
638 * Flags for IDirect3D9::CreateDevice's BehaviorFlags
639 *
640 ****************************************************************************/
641
642 const D3DCREATE_FPU_PRESERVE = 0x00000002L;
643 const D3DCREATE_MULTITHREADED = 0x00000004L;
644
645 const D3DCREATE_PUREDEVICE = 0x00000010L;
646 const D3DCREATE_SOFTWARE_VERTEXPROCESSING = 0x00000020L;
647 const D3DCREATE_HARDWARE_VERTEXPROCESSING = 0x00000040L;
648 const D3DCREATE_MIXED_VERTEXPROCESSING = 0x00000080L;
649
650 const D3DCREATE_DISABLE_DRIVER_MANAGEMENT = 0x00000100L;
651 const D3DCREATE_ADAPTERGROUP_DEVICE = 0x00000200L;
652 const D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX = 0x00000400L;
653
654 // This flag causes the D3D runtime not to alter the focus
655 // window in any way. Use with caution- the burden of supporting
656 // focus management events (alt-tab, etc.) falls on the
657 // application, and appropriate responses (switching display
658 // mode, etc.) should be coded.
659 const D3DCREATE_NOWINDOWCHANGES = 0x00000800L;
660
661 // Disable multithreading for software vertex processing
662 const D3DCREATE_DISABLE_PSGP_THREADING = 0x00002000L;
663 // This flag enables present statistics on device.
664 const D3DCREATE_ENABLE_PRESENTSTATS = 0x00004000L;
665 // This flag disables printscreen support in the runtime for this device
666 const D3DCREATE_DISABLE_PRINTSCREEN = 0x00008000L;
667
668 const D3DCREATE_SCREENSAVER = 0x10000000L;
669
670
671 /****************************************************************************
672 *
673 * Parameter for IDirect3D9::CreateDevice's Adapter argument
674 *
675 ****************************************************************************/
676
677 const D3DADAPTER_DEFAULT = 0;
678
679 /****************************************************************************
680 *
681 * Flags for IDirect3D9::EnumAdapters
682 *
683 ****************************************************************************/
684
685 /*
686 * The D3DENUM_WHQL_LEVEL value has been retired for 9Ex and future versions,
687 * but it needs to be defined here for compatibility with DX9 and earlier versions.
688 * See the DirectX SDK for sample code on discovering driver signatures.
689 */
690 const D3DENUM_WHQL_LEVEL = 0x00000002L;
691
692 /* NO_DRIVERVERSION will not fill out the DriverVersion field, nor will the
693 DriverVersion be incorporated into the DeviceIdentifier GUID. WINNT only */
694 const D3DENUM_NO_DRIVERVERSION = 0x00000004L;
695
696
697 /****************************************************************************
698 *
699 * Maximum number of back-buffers supported in DX9
700 *
701 ****************************************************************************/
702
703 const D3DPRESENT_BACK_BUFFERS_MAX = 3L;
704
705 /****************************************************************************
706 *
707 * Maximum number of back-buffers supported when apps use CreateDeviceEx
708 *
709 ****************************************************************************/
710 const D3DPRESENT_BACK_BUFFERS_MAX_EX = 30L;
711
712 /****************************************************************************
713 *
714 * Flags for IDirect3DDevice9::SetGammaRamp
715 *
716 ****************************************************************************/
717
718 const D3DSGR_NO_CALIBRATION = 0x00000000L;
719 const D3DSGR_CALIBRATE = 0x00000001L;
720
721 /****************************************************************************
722 *
723 * Flags for IDirect3DDevice9::SetCursorPosition
724 *
725 ****************************************************************************/
726
727 const D3DCURSOR_IMMEDIATE_UPDATE = 0x00000001L;
728
729 /****************************************************************************
730 *
731 * Flags for IDirect3DSwapChain9::Present
732 *
733 ****************************************************************************/
734
735 const D3DPRESENT_DONOTWAIT = 0x00000001L;
736 const D3DPRESENT_LINEAR_CONTENT = 0x00000002L;
737 const D3DPRESENT_DONOTFLIP = 0x00000004L;
738 const D3DPRESENT_FLIPRESTART = 0x00000008L;
739 const D3DPRESENT_VIDEO_RESTRICT_TO_MONITOR = 0x00000010L;
740
741 /****************************************************************************
742 *
743 * Flags for DrawPrimitive/DrawIndexedPrimitive
744 * Also valid for Begin/BeginIndexed
745 * Also valid for VertexBuffer::CreateVertexBuffer
746 ****************************************************************************/
747
748
749 /*
750 * DirectDraw error codes
751 */
752 const _FACD3D = 0x876;
753 HRESULT MAKE_D3DHRESULT(T)(T code) { return MAKE_HRESULT( 1, _FACD3D, code ); }
754 HRESULT MAKE_D3DSTATUS(T)(T code) { return MAKE_HRESULT( 0, _FACD3D, code ); }
755
756 /*
757 * Direct3D Errors
758 */
759 const HRESULT D3D_OK = S_OK;
760
761 const HRESULT D3DERR_WRONGTEXTUREFORMAT = MAKE_D3DHRESULT(2072);
762 const HRESULT D3DERR_UNSUPPORTEDCOLOROPERATION = MAKE_D3DHRESULT(2073);
763 const HRESULT D3DERR_UNSUPPORTEDCOLORARG = MAKE_D3DHRESULT(2074);
764 const HRESULT D3DERR_UNSUPPORTEDALPHAOPERATION = MAKE_D3DHRESULT(2075);
765 const HRESULT D3DERR_UNSUPPORTEDALPHAARG = MAKE_D3DHRESULT(2076);
766 const HRESULT D3DERR_TOOMANYOPERATIONS = MAKE_D3DHRESULT(2077);
767 const HRESULT D3DERR_CONFLICTINGTEXTUREFILTER = MAKE_D3DHRESULT(2078);
768 const HRESULT D3DERR_UNSUPPORTEDFACTORVALUE = MAKE_D3DHRESULT(2079);
769 const HRESULT D3DERR_CONFLICTINGRENDERSTATE = MAKE_D3DHRESULT(2081);
770 const HRESULT D3DERR_UNSUPPORTEDTEXTUREFILTER = MAKE_D3DHRESULT(2082);
771 const HRESULT D3DERR_CONFLICTINGTEXTUREPALETTE = MAKE_D3DHRESULT(2086);
772 const HRESULT D3DERR_DRIVERINTERNALERROR = MAKE_D3DHRESULT(2087);
773
774 const HRESULT D3DERR_NOTFOUND = MAKE_D3DHRESULT(2150);
775 const HRESULT D3DERR_MOREDATA = MAKE_D3DHRESULT(2151);
776 const HRESULT D3DERR_DEVICELOST = MAKE_D3DHRESULT(2152);
777 const HRESULT D3DERR_DEVICENOTRESET = MAKE_D3DHRESULT(2153);
778 const HRESULT D3DERR_NOTAVAILABLE = MAKE_D3DHRESULT(2154);
779 const HRESULT D3DERR_OUTOFVIDEOMEMORY = MAKE_D3DHRESULT(380);
780 const HRESULT D3DERR_INVALIDDEVICE = MAKE_D3DHRESULT(2155);
781 const HRESULT D3DERR_INVALIDCALL = MAKE_D3DHRESULT(2156);
782 const HRESULT D3DERR_DRIVERINVALIDCALL = MAKE_D3DHRESULT(2157);
783 const HRESULT D3DERR_WASSTILLDRAWING = MAKE_D3DHRESULT(540);
784 const HRESULT D3DOK_NOAUTOGEN = MAKE_D3DSTATUS(2159);
785 const HRESULT D3DERR_DEVICEREMOVED = MAKE_D3DHRESULT(2160);
786 const HRESULT S_NOT_RESIDENT = MAKE_D3DSTATUS(2165);
787 const HRESULT S_RESIDENT_IN_SHARED_MEMORY = MAKE_D3DSTATUS(2166);
788 const HRESULT S_PRESENT_MODE_CHANGED = MAKE_D3DSTATUS(2167);
789 const HRESULT S_PRESENT_OCCLUDED = MAKE_D3DSTATUS(2168);
790 const HRESULT D3DERR_DEVICEHUNG = MAKE_D3DHRESULT(2164);
791
792
793 /*********************
794 /* D3D9Ex interfaces
795 /*********************/
796
797 extern (Windows) HRESULT Direct3DCreate9Ex(UINT SDKVersion, LPDIRECT3D9EX*);
798
799 interface LPDIRECT3D9EX : LPDIRECT3D9
800 {
801 UINT GetAdapterModeCountEx(UINT Adapter, D3DDISPLAYMODEFILTER* pFilter );
802 HRESULT EnumAdapterModesEx( UINT Adapter, D3DDISPLAYMODEFILTER* pFilter,UINT Mode,D3DDISPLAYMODEEX* pMode);
803 HRESULT GetAdapterDisplayModeEx( UINT Adapter,D3DDISPLAYMODEEX* pMode,D3DDISPLAYROTATION* pRotation);
804 HRESULT CreateDeviceEx( UINT Adapter,D3DDEVTYPE DeviceType,HWND hFocusWindow,DWORD BehaviorFlags,D3DPRESENT_PARAMETERS* pPresentationParameters,D3DDISPLAYMODEEX* pFullscreenDisplayMode,LPDIRECT3DDEVICE9EX* ppReturnedDeviceInterface);
805 HRESULT GetAdapterLUID( UINT Adapter,LUID * pLUID);
806 }
807
808 alias LPDIRECT3D9EX IDirect3D9Ex;
809
810 interface LPDIRECT3DDEVICE9EX : LPDIRECT3DDEVICE9
811 {
812 HRESULT SetConvolutionMonoKernel( UINT width,UINT height,float* rows,float* columns);
813 HRESULT ComposeRects( LPDIRECT3DSURFACE9 pSrc,LPDIRECT3DSURFACE9 pDst,LPDIRECT3DVERTEXBUFFER9 pSrcRectDescs,UINT NumRects,LPDIRECT3DVERTEXBUFFER9 pDstRectDescs,D3DCOMPOSERECTSOP Operation,int Xoffset,int Yoffset);
814 HRESULT PresentEx( RECT* pSourceRect, RECT* pDestRect,HWND hDestWindowOverride, RGNDATA* pDirtyRegion,DWORD dwFlags);
815 HRESULT GetGPUThreadPriority( INT* pPriority);
816 HRESULT SetGPUThreadPriority( INT Priority);
817 HRESULT WaitForVBlank( UINT iSwapChain);
818 HRESULT CheckResourceResidency( LPDIRECT3DRESOURCE9* pResourceArray,UINT32 NumResources);
819 HRESULT SetMaximumFrameLatency( UINT MaxLatency);
820 HRESULT GetMaximumFrameLatency( UINT* pMaxLatency);
821 HRESULT CheckDeviceState( HWND hDestinationWindow);
822 HRESULT CreateRenderTargetEx( UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,LPDIRECT3DSURFACE9* ppSurface,HANDLE* pSharedHandle,DWORD Usage);
823 HRESULT CreateOffscreenPlainSurfaceEx( UINT Width,UINT Height,D3DFORMAT Format,D3DPOOL Pool,LPDIRECT3DSURFACE9* ppSurface,HANDLE* pSharedHandle,DWORD Usage);
824 HRESULT CreateDepthStencilSurfaceEx( UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,LPDIRECT3DSURFACE9* ppSurface,HANDLE* pSharedHandle,DWORD Usage);
825 HRESULT ResetEx( D3DPRESENT_PARAMETERS* pPresentationParameters,D3DDISPLAYMODEEX *pFullscreenDisplayMode);
826 HRESULT GetDisplayModeEx( UINT iSwapChain,D3DDISPLAYMODEEX* pMode,D3DDISPLAYROTATION* pRotation);
827 }
828
829 alias LPDIRECT3DDEVICE9EX IDirect3DDevice9Ex;
830
831 interface LPDIRECT3DSWAPCHAIN9EX : LPDIRECT3DSWAPCHAIN9
832 {
833 HRESULT GetLastPresentCount( UINT* pLastPresentCount);
834 HRESULT GetPresentStats( D3DPRESENTSTATS* pPresentationStatistics);
835 HRESULT GetDisplayModeEx( D3DDISPLAYMODEEX* pMode,D3DDISPLAYROTATION* pRotation);
836 }
837
838 alias LPDIRECT3DSWAPCHAIN9EX IDirect3DSwapChain9Ex;