]> git.notmuchmail.org Git - apitrace/blob - specs/d3d.py
d3dretrace: Recognize IDirect3DDevice9Ex::PresentEx as frame terminator.
[apitrace] / specs / d3d.py
1 ##########################################################################
2 #
3 # Copyright 2008-2009 VMware, Inc.
4 # All Rights Reserved.
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 # THE SOFTWARE.
23 #
24 ##########################################################################/
25
26 """d3d.h"""
27
28 from winapi import *
29 from ddraw import *
30 from d3dtypes import *
31 from d3dcaps import *
32
33 d3dnextFlags = Flags(DWORD, [
34     "D3DNEXT_NEXT",
35     "D3DNEXT_HEAD",
36     "D3DNEXT_TAIL",
37 ])
38
39 direct3dFlags = Flags(DWORD, [
40     "DIRECT3D_VERSION",
41 ])
42
43 d3ddpFlags = Flags(DWORD, [
44     "D3DDP_WAIT",
45     "D3DDP_OUTOFORDER",
46     "D3DDP_DONOTCLIP",
47     "D3DDP_DONOTUPDATEEXTENTS",
48     "D3DDP_DONOTLIGHT",
49 ])
50
51 HRESULT = MAKE_HRESULT(ok = "D3D_OK", errors = [
52     "D3DERR_BADMAJORVERSION",
53     "D3DERR_BADMINORVERSION",
54     "D3DERR_INVALID_DEVICE",
55     "D3DERR_INITFAILED",
56     "D3DERR_DEVICEAGGREGATED",
57     "D3DERR_EXECUTE_CREATE_FAILED",
58     "D3DERR_EXECUTE_DESTROY_FAILED",
59     "D3DERR_EXECUTE_LOCK_FAILED",
60     "D3DERR_EXECUTE_UNLOCK_FAILED",
61     "D3DERR_EXECUTE_LOCKED",
62     "D3DERR_EXECUTE_NOT_LOCKED",
63     "D3DERR_EXECUTE_FAILED",
64     "D3DERR_EXECUTE_CLIPPED_FAILED",
65     "D3DERR_TEXTURE_NO_SUPPORT",
66     "D3DERR_TEXTURE_CREATE_FAILED",
67     "D3DERR_TEXTURE_DESTROY_FAILED",
68     "D3DERR_TEXTURE_LOCK_FAILED",
69     "D3DERR_TEXTURE_UNLOCK_FAILED",
70     "D3DERR_TEXTURE_LOAD_FAILED",
71     "D3DERR_TEXTURE_SWAP_FAILED",
72     "D3DERR_TEXTURE_LOCKED",
73     "D3DERR_TEXTURE_NOT_LOCKED",
74     "D3DERR_TEXTURE_GETSURF_FAILED",
75     "D3DERR_MATRIX_CREATE_FAILED",
76     "D3DERR_MATRIX_DESTROY_FAILED",
77     "D3DERR_MATRIX_SETDATA_FAILED",
78     "D3DERR_MATRIX_GETDATA_FAILED",
79     "D3DERR_SETVIEWPORTDATA_FAILED",
80     "D3DERR_INVALIDCURRENTVIEWPORT",
81     "D3DERR_INVALIDPRIMITIVETYPE",
82     "D3DERR_INVALIDVERTEXTYPE",
83     "D3DERR_TEXTURE_BADSIZE",
84     "D3DERR_INVALIDRAMPTEXTURE",
85     "D3DERR_MATERIAL_CREATE_FAILED",
86     "D3DERR_MATERIAL_DESTROY_FAILED",
87     "D3DERR_MATERIAL_SETDATA_FAILED",
88     "D3DERR_MATERIAL_GETDATA_FAILED",
89     "D3DERR_INVALIDPALETTE",
90     "D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY",
91     "D3DERR_ZBUFF_NEEDS_VIDEOMEMORY",
92     "D3DERR_SURFACENOTINVIDMEM",
93     "D3DERR_LIGHT_SET_FAILED",
94     "D3DERR_LIGHTHASVIEWPORT",
95     "D3DERR_LIGHTNOTINTHISVIEWPORT",
96     "D3DERR_SCENE_IN_SCENE",
97     "D3DERR_SCENE_NOT_IN_SCENE",
98     "D3DERR_SCENE_BEGIN_FAILED",
99     "D3DERR_SCENE_END_FAILED",
100     "D3DERR_INBEGIN",
101     "D3DERR_NOTINBEGIN",
102     "D3DERR_NOVIEWPORTS",
103     "D3DERR_VIEWPORTDATANOTSET",
104     "D3DERR_VIEWPORTHASNODEVICE",
105     "D3DERR_NOCURRENTVIEWPORT",
106     "D3DERR_INVALIDVERTEXFORMAT",
107     "D3DERR_COLORKEYATTACHED",
108     "D3DERR_VERTEXBUFFEROPTIMIZED",
109     "D3DERR_VBUF_CREATE_FAILED",
110     "D3DERR_VERTEXBUFFERLOCKED",
111     "D3DERR_VERTEXBUFFERUNLOCKFAILED",
112     "D3DERR_ZBUFFER_NOTPRESENT",
113     "D3DERR_STENCILBUFFER_NOTPRESENT",
114     "D3DERR_WRONGTEXTUREFORMAT",
115     "D3DERR_UNSUPPORTEDCOLOROPERATION",
116     "D3DERR_UNSUPPORTEDCOLORARG",
117     "D3DERR_UNSUPPORTEDALPHAOPERATION",
118     "D3DERR_UNSUPPORTEDALPHAARG",
119     "D3DERR_TOOMANYOPERATIONS",
120     "D3DERR_CONFLICTINGTEXTUREFILTER",
121     "D3DERR_UNSUPPORTEDFACTORVALUE",
122     "D3DERR_CONFLICTINGRENDERSTATE",
123     "D3DERR_UNSUPPORTEDTEXTUREFILTER",
124     "D3DERR_TOOMANYPRIMITIVES",
125     "D3DERR_INVALIDMATRIX",
126     "D3DERR_TOOMANYVERTICES",
127     "D3DERR_CONFLICTINGTEXTUREPALETTE",
128     "D3DERR_INVALIDSTATEBLOCK",
129     "D3DERR_INBEGINSTATEBLOCK",
130     "D3DERR_NOTINBEGINSTATEBLOCK",
131 ])
132
133 IDirect3D = Interface("IDirect3D", IUnknown)
134 IDirect3D2 = Interface("IDirect3D2", IUnknown)
135 IDirect3D3 = Interface("IDirect3D3", IUnknown)
136 IDirect3D7 = Interface("IDirect3D7", IUnknown)
137 IDirect3DDevice = Interface("IDirect3DDevice", IUnknown)
138 IDirect3DDevice2 = Interface("IDirect3DDevice2", IUnknown)
139 IDirect3DDevice3 = Interface("IDirect3DDevice3", IUnknown)
140 IDirect3DDevice7 = Interface("IDirect3DDevice7", IUnknown)
141 IDirect3DExecuteBuffer = Interface("IDirect3DExecuteBuffer", IUnknown)
142 IDirect3DLight = Interface("IDirect3DLight", IUnknown)
143 IDirect3DMaterial = Interface("IDirect3DMaterial", IUnknown)
144 IDirect3DMaterial2 = Interface("IDirect3DMaterial2", IUnknown)
145 IDirect3DMaterial3 = Interface("IDirect3DMaterial3", IUnknown)
146 IDirect3DTexture = Interface("IDirect3DTexture", IUnknown)
147 IDirect3DTexture2 = Interface("IDirect3DTexture2", IUnknown)
148 IDirect3DViewport = Interface("IDirect3DViewport", IUnknown)
149 IDirect3DViewport2 = Interface("IDirect3DViewport2", IDirect3DViewport)
150 IDirect3DViewport3 = Interface("IDirect3DViewport3", IDirect3DViewport2)
151 IDirect3DVertexBuffer = Interface("IDirect3DVertexBuffer", IUnknown)
152 IDirect3DVertexBuffer7 = Interface("IDirect3DVertexBuffer7", IUnknown)
153
154 LPUNKNOWN = ObjPointer(IUnknown)
155
156 LPDIRECT3D = ObjPointer(IDirect3D)
157 LPDIRECT3DDEVICE = ObjPointer(IDirect3DDevice)
158 LPDIRECT3DEXECUTEBUFFER = ObjPointer(IDirect3DExecuteBuffer)
159 LPDIRECT3DLIGHT = ObjPointer(IDirect3DLight)
160 LPDIRECT3DMATERIAL = ObjPointer(IDirect3DMaterial)
161 LPDIRECT3DTEXTURE = ObjPointer(IDirect3DTexture)
162 LPDIRECT3DVIEWPORT = ObjPointer(IDirect3DViewport)
163
164 LPDIRECT3D2 = ObjPointer(IDirect3D2)
165 LPDIRECT3DDEVICE2 = ObjPointer(IDirect3DDevice2)
166 LPDIRECT3DMATERIAL2 = ObjPointer(IDirect3DMaterial2)
167 LPDIRECT3DTEXTURE2 = ObjPointer(IDirect3DTexture2)
168 LPDIRECT3DVIEWPORT2 = ObjPointer(IDirect3DViewport2)
169
170 LPDIRECT3D3 = ObjPointer(IDirect3D3)
171 LPDIRECT3DDEVICE3 = ObjPointer(IDirect3DDevice3)
172 LPDIRECT3DMATERIAL3 = ObjPointer(IDirect3DMaterial3)
173 LPDIRECT3DVIEWPORT3 = ObjPointer(IDirect3DViewport3)
174 LPDIRECT3DVERTEXBUFFER = ObjPointer(IDirect3DVertexBuffer)
175
176 LPDIRECT3D7 = ObjPointer(IDirect3D7)
177 LPDIRECT3DDEVICE7 = ObjPointer(IDirect3DDevice7)
178 LPDIRECT3DVERTEXBUFFER7 = ObjPointer(IDirect3DVertexBuffer7)
179
180 IDirect3D.methods += [
181     StdMethod(HRESULT, "Initialize", [(REFCLSID, "riid")]),
182     StdMethod(HRESULT, "EnumDevices", [(LPD3DENUMDEVICESCALLBACK, "lpEnumDevicesCallback"), (LPVOID, "lpUserArg")]),
183     StdMethod(HRESULT, "CreateLight", [Out(Pointer(LPDIRECT3DLIGHT), "lplpDirect3DLight"), (LPUNKNOWN, "pUnkOuter")]),
184     StdMethod(HRESULT, "CreateMaterial", [Out(Pointer(LPDIRECT3DMATERIAL), "lplpDirect3DMaterial"), (LPUNKNOWN, "pUnkOuter")]),
185     StdMethod(HRESULT, "CreateViewport", [Out(Pointer(LPDIRECT3DVIEWPORT), "lplpD3DViewport"), (LPUNKNOWN, "pUnkOuter")]),
186     StdMethod(HRESULT, "FindDevice", [(LPD3DFINDDEVICESEARCH, "lpD3DDFS"), (LPD3DFINDDEVICERESULT, "lplpD3DDevice")]),
187 ]
188
189 IDirect3D2.methods += [
190     StdMethod(HRESULT, "EnumDevices", [(LPD3DENUMDEVICESCALLBACK, "lpEnumDevicesCallback"), (LPVOID, "lpUserArg")]),
191     StdMethod(HRESULT, "CreateLight", [Out(Pointer(LPDIRECT3DLIGHT), "lplpDirect3DLight"), (LPUNKNOWN, "pUnkOuter")]),
192     StdMethod(HRESULT, "CreateMaterial", [Out(Pointer(LPDIRECT3DMATERIAL2), "lplpDirect3DMaterial2"), (LPUNKNOWN, "pUnkOuter")]),
193     StdMethod(HRESULT, "CreateViewport", [Out(Pointer(LPDIRECT3DVIEWPORT2), "lplpD3DViewport2"), (LPUNKNOWN, "pUnkOuter")]),
194     StdMethod(HRESULT, "FindDevice", [(LPD3DFINDDEVICESEARCH, "lpD3DDFS"), (LPD3DFINDDEVICERESULT, "lpD3DFDR")]),
195     StdMethod(HRESULT, "CreateDevice", [(REFCLSID, "rclsid"), (LPDIRECTDRAWSURFACE, "lpDDS"), Out(Pointer(LPDIRECT3DDEVICE2), "lplpD3DDevice2")]),
196 ]
197
198 IDirect3D3.methods += [
199     StdMethod(HRESULT, "EnumDevices", [(LPD3DENUMDEVICESCALLBACK, "lpEnumDevicesCallback"), (LPVOID, "lpUserArg")]),
200     StdMethod(HRESULT, "CreateLight", [Out(Pointer(LPDIRECT3DLIGHT), "lplpDirect3DLight"), (LPUNKNOWN, "pUnkOuter")]),
201     StdMethod(HRESULT, "CreateMaterial", [Out(Pointer(LPDIRECT3DMATERIAL3), "lplpDirect3DMaterial3"), (LPUNKNOWN, "pUnkOuter")]),
202     StdMethod(HRESULT, "CreateViewport", [Out(Pointer(LPDIRECT3DVIEWPORT3), "lplpD3DViewport3"), (LPUNKNOWN, "pUnkOuter")]),
203     StdMethod(HRESULT, "FindDevice", [(LPD3DFINDDEVICESEARCH, "lpD3DDFS"), Out(LPD3DFINDDEVICERESULT, "lpD3DFDR")]),
204     StdMethod(HRESULT, "CreateDevice", [(REFCLSID, "rclsid"), (LPDIRECTDRAWSURFACE4, "lpDDS"), Out(Pointer(LPDIRECT3DDEVICE3), "lplpD3DDevice3"), (LPUNKNOWN, "lpUnk")]),
205     StdMethod(HRESULT, "CreateVertexBuffer", [(LPD3DVERTEXBUFFERDESC, "lpD3DVertBufDesc"), Out(Pointer(LPDIRECT3DVERTEXBUFFER), "lplpD3DVertBuf"), (DWORD, "dwFlags"), (LPUNKNOWN, "lpUnk")]),
206     StdMethod(HRESULT, "EnumZBufferFormats", [(REFCLSID, "riidDevice"), (LPD3DENUMPIXELFORMATSCALLBACK, "lpEnumCallback"), (LPVOID, "lpContext")]),
207     StdMethod(HRESULT, "EvictManagedTextures", []),
208 ]
209
210 IDirect3D7.methods += [
211     StdMethod(HRESULT, "EnumDevices", [(LPD3DENUMDEVICESCALLBACK7, "lpEnumDevicesCallback"), (LPVOID, "lpUserArg")]),
212     StdMethod(HRESULT, "CreateDevice", [(REFCLSID, "rclsid"), (LPDIRECTDRAWSURFACE7, "lpDDS"), Out(Pointer(LPDIRECT3DDEVICE7), "lplpD3DDevice")]),
213     StdMethod(HRESULT, "CreateVertexBuffer", [(LPD3DVERTEXBUFFERDESC, "lpD3DVertBufDesc"), Out(Pointer(LPDIRECT3DVERTEXBUFFER7), "lplpD3DVertBuf"), (DWORD, "dwFlags")]),
214     StdMethod(HRESULT, "EnumZBufferFormats", [(REFCLSID, "riidDevice"), (LPD3DENUMPIXELFORMATSCALLBACK, "lpEnumCallback"), (LPVOID, "lpContext")]),
215     StdMethod(HRESULT, "EvictManagedTextures", []),
216 ]
217
218 IDirect3DDevice.methods += [
219     StdMethod(HRESULT, "Initialize", [(LPDIRECT3D, "lpDirect3D"), (LPGUID, "lpGUID"), (LPD3DDEVICEDESC, "lpD3DDVDesc")]),
220     StdMethod(HRESULT, "GetCaps", [Out(LPD3DDEVICEDESC, "lpD3DHWDevDesc"), Out(LPD3DDEVICEDESC, "lpD3DHELDevDesc")]),
221     StdMethod(HRESULT, "SwapTextureHandles", [(LPDIRECT3DTEXTURE, "lpD3Dtex1"), (LPDIRECT3DTEXTURE, "lpD3DTex2")]),
222     StdMethod(HRESULT, "CreateExecuteBuffer", [(LPD3DEXECUTEBUFFERDESC, "lpDesc"), Out(Pointer(LPDIRECT3DEXECUTEBUFFER), "lplpDirect3DExecuteBuffer"), (LPUNKNOWN, "pUnkOuter")]),
223     StdMethod(HRESULT, "GetStats", [(LPD3DSTATS, "lpD3DStats")]),
224     StdMethod(HRESULT, "Execute", [(LPDIRECT3DEXECUTEBUFFER, "lpDirect3DExecuteBuffer"), (LPDIRECT3DVIEWPORT, "lpDirect3DViewport"), (DWORD, "dwFlags")]),
225     StdMethod(HRESULT, "AddViewport", [(LPDIRECT3DVIEWPORT, "lpDirect3DViewport")]),
226     StdMethod(HRESULT, "DeleteViewport", [(LPDIRECT3DVIEWPORT, "lpDirect3DViewport")]),
227     StdMethod(HRESULT, "NextViewport", [(LPDIRECT3DVIEWPORT, "lpDirect3DViewport"), Out(Pointer(LPDIRECT3DVIEWPORT), "lplpDirect3DViewport"), (DWORD, "dwFlags")]),
228     StdMethod(HRESULT, "Pick", [(LPDIRECT3DEXECUTEBUFFER, "lpDirect3DExecuteBuffer"), (LPDIRECT3DVIEWPORT, "lpDirect3DViewport"), (DWORD, "dwFlags"), (LPD3DRECT, "lpRect")]),
229     StdMethod(HRESULT, "GetPickRecords", [(LPDWORD, "lpCount"), (LPD3DPICKRECORD, "lpD3DPickRec")]),
230     StdMethod(HRESULT, "EnumTextureFormats", [(LPD3DENUMTEXTUREFORMATSCALLBACK, "lpD3DEnumTextureProc"), (LPVOID, "lpArg")]),
231     StdMethod(HRESULT, "CreateMatrix", [Out(LPD3DMATRIXHANDLE, "lpD3DMatHandle")]),
232     StdMethod(HRESULT, "SetMatrix", [(D3DMATRIXHANDLE, "D3DMatHandle"), (Const(LPD3DMATRIX), "lpD3DMatrix")]),
233     StdMethod(HRESULT, "GetMatrix", [(D3DMATRIXHANDLE, "D3DMatHandle"), Out(LPD3DMATRIX, "lpD3DMatrix")]),
234     StdMethod(HRESULT, "DeleteMatrix", [(D3DMATRIXHANDLE, "D3DMatHandle")]),
235     StdMethod(HRESULT, "BeginScene", []),
236     StdMethod(HRESULT, "EndScene", []),
237     StdMethod(HRESULT, "GetDirect3D", [Out(Pointer(LPDIRECT3D), "lplpDirect3D")]),
238 ]
239
240 IDirect3DDevice2.methods += [
241     StdMethod(HRESULT, "GetCaps", [Out(LPD3DDEVICEDESC, "lpD3DHWDevDesc"), Out(LPD3DDEVICEDESC, "lpD3DHELDevDesc")]),
242     StdMethod(HRESULT, "SwapTextureHandles", [(LPDIRECT3DTEXTURE2, "lpD3DTex1"), (LPDIRECT3DTEXTURE2, "lpD3DTex2")]),
243     StdMethod(HRESULT, "GetStats", [Out(LPD3DSTATS, "lpD3DStats")]),
244     StdMethod(HRESULT, "AddViewport", [(LPDIRECT3DVIEWPORT2, "lpDirect3DViewport2")]),
245     StdMethod(HRESULT, "DeleteViewport", [(LPDIRECT3DVIEWPORT2, "lpDirect3DViewport2")]),
246     StdMethod(HRESULT, "NextViewport", [(LPDIRECT3DVIEWPORT2, "lpDirect3DViewport2"), Out(Pointer(LPDIRECT3DVIEWPORT2), "lplpDirect3DViewport2"), (DWORD, "dwFlags")]),
247     StdMethod(HRESULT, "EnumTextureFormats", [(LPD3DENUMTEXTUREFORMATSCALLBACK, "lpD3DEnumTextureProc"), (LPVOID, "lpArg")]),
248     StdMethod(HRESULT, "BeginScene", []),
249     StdMethod(HRESULT, "EndScene", []),
250     StdMethod(HRESULT, "GetDirect3D", [Out(Pointer(LPDIRECT3D2), "lplpDirect3D2")]),
251     StdMethod(HRESULT, "SetCurrentViewport", [(LPDIRECT3DVIEWPORT2, "lpDirect3DViewport2")]),
252     StdMethod(HRESULT, "GetCurrentViewport", [Out(Pointer(LPDIRECT3DVIEWPORT2), "lplpDirect3DViewport2")]),
253     StdMethod(HRESULT, "SetRenderTarget", [(LPDIRECTDRAWSURFACE, "lpNewRenderTarget"), (DWORD, "dwFlags")]),
254     StdMethod(HRESULT, "GetRenderTarget", [Out(Pointer(LPDIRECTDRAWSURFACE), "lplpRenderTarget")]),
255     StdMethod(HRESULT, "Begin", [(D3DPRIMITIVETYPE, "d3dpt"), (D3DVERTEXTYPE, "dwVertexTypeDesc"), (DWORD, "dwFlags")]),
256     StdMethod(HRESULT, "BeginIndexed", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (D3DVERTEXTYPE, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwNumVertices"), (DWORD, "dwFlags")]),
257     StdMethod(HRESULT, "Vertex", [(LPVOID, "lpVertexType")]),
258     StdMethod(HRESULT, "Index", [(WORD, "wVertexIndex")]),
259     StdMethod(HRESULT, "End", [(DWORD, "dwFlags")]),
260     StdMethod(HRESULT, "GetRenderState", [(D3DRENDERSTATETYPE, "dwRenderStateType"), Out(LPDWORD, "lpdwRenderState")]),
261     StdMethod(HRESULT, "SetRenderState", [(D3DRENDERSTATETYPE, "dwRenderStateType"), (DWORD, "dwRenderState")]),
262     StdMethod(HRESULT, "GetLightState", [(D3DLIGHTSTATETYPE, "dwLightStateType"), Out(LPDWORD, "lpdwLightState")]),
263     StdMethod(HRESULT, "SetLightState", [(D3DLIGHTSTATETYPE, "dwLightStateType"), (DWORD, "dwLightState")]),
264     StdMethod(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), (LPD3DMATRIX, "lpD3DMatrix")]),
265     StdMethod(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), Out(LPD3DMATRIX, "lpD3DMatrix")]),
266     StdMethod(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), (LPD3DMATRIX, "lpD3DMatrix")]),
267     StdMethod(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (D3DVERTEXTYPE, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwVertexCount"), (DWORD, "dwFlags")]),
268     StdMethod(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (D3DVERTEXTYPE, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwVertexCount"), (LPWORD, "dwIndices"), (DWORD, "dwIndexCount"), (DWORD, "dwFlags")]),
269     StdMethod(HRESULT, "SetClipStatus", [(LPD3DCLIPSTATUS, "lpD3DClipStatus")]),
270     StdMethod(HRESULT, "GetClipStatus", [(LPD3DCLIPSTATUS, "lpD3DClipStatus")]),
271 ]
272
273 IDirect3DDevice3.methods += [
274     StdMethod(HRESULT, "GetCaps", [Out(LPD3DDEVICEDESC, "lpD3DHWDevDesc"), Out(LPD3DDEVICEDESC, "lpD3DHELDevDesc")]),
275     StdMethod(HRESULT, "GetStats", [Out(LPD3DSTATS, "lpD3DStats")]),
276     StdMethod(HRESULT, "AddViewport", [(LPDIRECT3DVIEWPORT3, "lpDirect3DViewport3")]),
277     StdMethod(HRESULT, "DeleteViewport", [(LPDIRECT3DVIEWPORT3, "lpDirect3DViewport3")]),
278     StdMethod(HRESULT, "NextViewport", [(LPDIRECT3DVIEWPORT3, "lpDirect3DViewport3"), Out(Pointer(LPDIRECT3DVIEWPORT3), "lplpDirect3DViewport3"), (DWORD, "dwFlags")]),
279     StdMethod(HRESULT, "EnumTextureFormats", [(LPD3DENUMPIXELFORMATSCALLBACK, "lpD3DEnumPixelProc"), (LPVOID, "lpArg")]),
280     StdMethod(HRESULT, "BeginScene", []),
281     StdMethod(HRESULT, "EndScene", []),
282     StdMethod(HRESULT, "GetDirect3D", [Out(Pointer(LPDIRECT3D3), "lplpDirect3D3")]),
283     StdMethod(HRESULT, "SetCurrentViewport", [(LPDIRECT3DVIEWPORT3, "lpDirect3DViewport3")]),
284     StdMethod(HRESULT, "GetCurrentViewport", [Out(Pointer(LPDIRECT3DVIEWPORT3), "lplpDirect3DViewport3")]),
285     StdMethod(HRESULT, "SetRenderTarget", [(LPDIRECTDRAWSURFACE4, "lpNewRenderTarget"), (DWORD, "dwFlags")]),
286     StdMethod(HRESULT, "GetRenderTarget", [Out(Pointer(LPDIRECTDRAWSURFACE4), "lplpRenderTarget")]),
287     StdMethod(HRESULT, "Begin", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (DWORD, "dwVertexTypeDesc"), (DWORD, "dwFlags")]),
288     StdMethod(HRESULT, "BeginIndexed", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (DWORD, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwNumVertices"), (DWORD, "dwFlags")]),
289     StdMethod(HRESULT, "Vertex", [(LPVOID, "lpVertexType")]),
290     StdMethod(HRESULT, "Index", [(WORD, "wVertexIndex")]),
291     StdMethod(HRESULT, "End", [(DWORD, "dwFlags")]),
292     StdMethod(HRESULT, "GetRenderState", [(D3DRENDERSTATETYPE, "dwRenderStateType"), Out(LPDWORD, "lpdwRenderState")]),
293     StdMethod(HRESULT, "SetRenderState", [(D3DRENDERSTATETYPE, "dwRenderStateType"), (DWORD, "dwRenderState")]),
294     StdMethod(HRESULT, "GetLightState", [(D3DLIGHTSTATETYPE, "dwLightStateType"), Out(LPDWORD, "lpdwLightState")]),
295     StdMethod(HRESULT, "SetLightState", [(D3DLIGHTSTATETYPE, "dwLightStateType"), (DWORD, "dwLightState")]),
296     StdMethod(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), (LPD3DMATRIX, "lpD3DMatrix")]),
297     StdMethod(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), Out(LPD3DMATRIX, "lpD3DMatrix")]),
298     StdMethod(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), (LPD3DMATRIX, "lpD3DMatrix")]),
299     StdMethod(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (DWORD, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwVertexCount"), (DWORD, "dwFlags")]),
300     StdMethod(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (DWORD, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwVertexCount"), (LPWORD, "dwIndices"), (DWORD, "dwIndexCount"), (DWORD, "dwFlags")]),
301     StdMethod(HRESULT, "SetClipStatus", [(LPD3DCLIPSTATUS, "lpD3DClipStatus")]),
302     StdMethod(HRESULT, "GetClipStatus", [Out(LPD3DCLIPSTATUS, "lpD3DClipStatus")]),
303     StdMethod(HRESULT, "DrawPrimitiveStrided", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (DWORD, "dwVertexType"), (LPD3DDRAWPRIMITIVESTRIDEDDATA, "lpD3DDrawPrimStrideData"), (DWORD, "dwVertexCount"), (DWORD, "dwFlags")]),
304     StdMethod(HRESULT, "DrawIndexedPrimitiveStrided", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (DWORD, "dwVertexType"), (LPD3DDRAWPRIMITIVESTRIDEDDATA, "lpD3DDrawPrimStrideData"), (DWORD, "dwVertexCount"), (LPWORD, "lpIndex"), (DWORD, "dwIndexCount"), (DWORD, "dwFlags")]),
305     StdMethod(HRESULT, "DrawPrimitiveVB", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (LPDIRECT3DVERTEXBUFFER, "lpD3DVertexBuf"), (DWORD, "dwStartVertex"), (DWORD, "dwNumVertices"), (DWORD, "dwFlags")]),
306     StdMethod(HRESULT, "DrawIndexedPrimitiveVB", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (LPDIRECT3DVERTEXBUFFER, "lpD3DVertexBuf"), (LPWORD, "lpwIndices"), (DWORD, "dwIndexCount"), (DWORD, "dwFlags")]),
307     StdMethod(HRESULT, "ComputeSphereVisibility", [(LPD3DVECTOR, "lpCenters"), (LPD3DVALUE, "lpRadii"), (DWORD, "dwNumSpheres"), (DWORD, "dwFlags"), (LPDWORD, "lpdwReturnValues")]),
308     StdMethod(HRESULT, "GetTexture", [(DWORD, "dwStage"), Out(Pointer(LPDIRECT3DTEXTURE2), "lplpTexture2")]),
309     StdMethod(HRESULT, "SetTexture", [(DWORD, "dwStage"), (LPDIRECT3DTEXTURE2, "lpTexture2")]),
310     StdMethod(HRESULT, "GetTextureStageState", [(DWORD, "dwStage"), (D3DTEXTURESTAGESTATETYPE, "d3dTexStageStateType"), Out(LPDWORD, "lpdwState")]),
311     StdMethod(HRESULT, "SetTextureStageState", [(DWORD, "dwStage"), (D3DTEXTURESTAGESTATETYPE, "d3dTexStageStateType"), (DWORD, "dwState")]),
312     StdMethod(HRESULT, "ValidateDevice", [(LPDWORD, "lpdwPasses")]),
313 ]
314
315 IDirect3DDevice7.methods += [
316     StdMethod(HRESULT, "GetCaps", [Out(LPD3DDEVICEDESC7, "lpD3DHELDevDesc")]),
317     StdMethod(HRESULT, "EnumTextureFormats", [(LPD3DENUMPIXELFORMATSCALLBACK, "lpD3DEnumPixelProc"), (LPVOID, "lpArg")]),
318     StdMethod(HRESULT, "BeginScene", []),
319     StdMethod(HRESULT, "EndScene", []),
320     StdMethod(HRESULT, "GetDirect3D", [Out(Pointer(LPDIRECT3D7), "lplpDirect3D3")]),
321     StdMethod(HRESULT, "SetRenderTarget", [(LPDIRECTDRAWSURFACE7, "lpNewRenderTarget"), (DWORD, "dwFlags")]),
322     StdMethod(HRESULT, "GetRenderTarget", [Out(Pointer(LPDIRECTDRAWSURFACE7), "lplpRenderTarget")]),
323     StdMethod(HRESULT, "Clear", [(DWORD, "dwCount"), (LPD3DRECT, "lpRects"), (DWORD, "dwFlags"), (D3DCOLOR, "dwColor"), (D3DVALUE, "dvZ"), (DWORD, "dwStencil")]),
324     StdMethod(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), (LPD3DMATRIX, "lpD3DMatrix")]),
325     StdMethod(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), Out(LPD3DMATRIX, "lpD3DMatrix")]),
326     StdMethod(HRESULT, "SetViewport", [(LPD3DVIEWPORT7, "lpData")]),
327     StdMethod(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "dtstTransformStateType"), (LPD3DMATRIX, "lpD3DMatrix")]),
328     StdMethod(HRESULT, "GetViewport", [Out(LPD3DVIEWPORT7, "lpData")]),
329     StdMethod(HRESULT, "SetMaterial", [(LPD3DMATERIAL7, "lpMat")]),
330     StdMethod(HRESULT, "GetMaterial", [Out(LPD3DMATERIAL7, "lpMat")]),
331     StdMethod(HRESULT, "SetLight", [(DWORD, "dwLightIndex"), (LPD3DLIGHT7, "lpLight")]),
332     StdMethod(HRESULT, "GetLight", [(DWORD, "dwLightIndex"), (LPD3DLIGHT7, "lpLight")]),
333     StdMethod(HRESULT, "SetRenderState", [(D3DRENDERSTATETYPE, "dwRenderStateType"), (DWORD, "dwRenderState")]),
334     StdMethod(HRESULT, "GetRenderState", [(D3DRENDERSTATETYPE, "dwRenderStateType"), Out(LPDWORD, "lpdwRenderState")]),
335     StdMethod(HRESULT, "BeginStateBlock", []),
336     StdMethod(HRESULT, "EndStateBlock", [Out(LPDWORD, "lpdwBlockHandle")]),
337     StdMethod(HRESULT, "PreLoad", [(LPDIRECTDRAWSURFACE7, "lpddsTexture")]),
338     StdMethod(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (D3DFVF, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwVertexCount"), (DWORD, "dwFlags")]),
339     StdMethod(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (D3DFVF, "d3dvtVertexType"), (LPVOID, "lpvVertices"), (DWORD, "dwVertexCount"), (LPWORD, "dwIndices"), (DWORD, "dwIndexCount"), (DWORD, "dwFlags")]),
340     StdMethod(HRESULT, "SetClipStatus", [(LPD3DCLIPSTATUS, "lpD3DClipStatus")]),
341     StdMethod(HRESULT, "GetClipStatus", [Out(LPD3DCLIPSTATUS, "lpD3DClipStatus")]),
342     StdMethod(HRESULT, "DrawPrimitiveStrided", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (D3DFVF, "dwVertexType"), (LPD3DDRAWPRIMITIVESTRIDEDDATA, "lpD3DDrawPrimStrideData"), (DWORD, "dwVertexCount"), (DWORD, "dwFlags")]),
343     StdMethod(HRESULT, "DrawIndexedPrimitiveStrided", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (D3DFVF, "dwVertexType"), (LPD3DDRAWPRIMITIVESTRIDEDDATA, "lpD3DDrawPrimStrideData"), (DWORD, "dwVertexCount"), (LPWORD, "lpIndex"), (DWORD, "dwIndexCount"), (DWORD, "dwFlags")]),
344     StdMethod(HRESULT, "DrawPrimitiveVB", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (LPDIRECT3DVERTEXBUFFER7, "lpD3DVertexBuf"), (DWORD, "dwStartVertex"), (DWORD, "dwNumVertices"), (DWORD, "dwFlags")]),
345     StdMethod(HRESULT, "DrawIndexedPrimitiveVB", [(D3DPRIMITIVETYPE, "d3dptPrimitiveType"), (LPDIRECT3DVERTEXBUFFER7, "lpD3DVertexBuf"), (DWORD, "dwStartVertex"), (DWORD, "dwNumVertices"), (LPWORD, "lpwIndices"), (DWORD, "dwIndexCount"), (DWORD, "dwFlags")]),
346     StdMethod(HRESULT, "ComputeSphereVisibility", [(LPD3DVECTOR, "lpCenters"), (LPD3DVALUE, "lpRadii"), (DWORD, "dwNumSpheres"), (DWORD, "dwFlags"), (LPDWORD, "lpdwReturnValues")]),
347     StdMethod(HRESULT, "GetTexture", [(DWORD, "dwStage"), Out(Pointer(LPDIRECTDRAWSURFACE7), "lpTexture")]),
348     StdMethod(HRESULT, "SetTexture", [(DWORD, "dwStage"), (LPDIRECTDRAWSURFACE7, "lpTexture")]),
349     StdMethod(HRESULT, "GetTextureStageState", [(DWORD, "dwStage"), (D3DTEXTURESTAGESTATETYPE, "d3dTexStageStateType"), Out(LPDWORD, "lpdwState")]),
350     StdMethod(HRESULT, "SetTextureStageState", [(DWORD, "dwStage"), (D3DTEXTURESTAGESTATETYPE, "d3dTexStageStateType"), (DWORD, "dwState")]),
351     StdMethod(HRESULT, "ValidateDevice", [Out(LPDWORD, "lpdwPasses")]),
352     StdMethod(HRESULT, "ApplyStateBlock", [(DWORD, "dwBlockHandle")]),
353     StdMethod(HRESULT, "CaptureStateBlock", [(DWORD, "dwBlockHandle")]),
354     StdMethod(HRESULT, "DeleteStateBlock", [(DWORD, "dwBlockHandle")]),
355     StdMethod(HRESULT, "CreateStateBlock", [(D3DSTATEBLOCKTYPE, "d3dsbType"), Out(LPDWORD, "lpdwBlockHandle")]),
356     StdMethod(HRESULT, "Load", [(LPDIRECTDRAWSURFACE7, "lpDestTex"), (LPPOINT, "lpDestPoint"), (LPDIRECTDRAWSURFACE7, "lpSrcTex"), (LPRECT, "lprcSrcRect"), (DWORD, "dwFlags")]),
357     StdMethod(HRESULT, "LightEnable", [(DWORD, "dwLightIndex"), (BOOL, "bEnable")]),
358     StdMethod(HRESULT, "GetLightEnable", [(DWORD, "dwLightIndex"), Out(Pointer(BOOL), "pbEnable")]),
359     StdMethod(HRESULT, "SetClipPlane", [(DWORD, "dwIndex"), (Pointer(D3DVALUE), "pPlaneEquation")]),
360     StdMethod(HRESULT, "GetClipPlane", [(DWORD, "dwIndex"), Out(Pointer(D3DVALUE), "pPlaneEquation")]),
361     StdMethod(HRESULT, "GetInfo", [(DWORD, "dwDevInfoID"), Out(LPVOID, "pDevInfoStruct"), (DWORD, "dwSize")]),
362 ]
363
364 IDirect3DExecuteBuffer.methods += [
365     StdMethod(HRESULT, "Initialize", [(LPDIRECT3DDEVICE, "lpDirect3DDevice"), (LPD3DEXECUTEBUFFERDESC, "lpDesc")]),
366     StdMethod(HRESULT, "Lock", [(LPD3DEXECUTEBUFFERDESC, "lpDesc")]),
367     StdMethod(HRESULT, "Unlock", []),
368     StdMethod(HRESULT, "SetExecuteData", [(LPD3DEXECUTEDATA, "lpData")]),
369     StdMethod(HRESULT, "GetExecuteData", [Out(LPD3DEXECUTEDATA, "lpData")]),
370     StdMethod(HRESULT, "Validate", [(LPDWORD, "lpdwOffset"), (LPD3DVALIDATECALLBACK, "lpFunc"), (LPVOID, "lpUserArg"), (DWORD, "dwReserved")]),
371     StdMethod(HRESULT, "Optimize", [(DWORD, "dwDummy")]),
372 ]
373
374 IDirect3DLight.methods += [
375     StdMethod(HRESULT, "Initialize", [(LPDIRECT3D, "lpDirect3D")]),
376     StdMethod(HRESULT, "SetLight", [(LPD3DLIGHT, "lpLight")]),
377     StdMethod(HRESULT, "GetLight", [Out(LPD3DLIGHT, "lpLight")]),
378 ]
379
380 IDirect3DMaterial.methods += [
381     StdMethod(HRESULT, "Initialize", [(LPDIRECT3D, "lpDirect3D")]),
382     StdMethod(HRESULT, "SetMaterial", [(LPD3DMATERIAL, "lpMat")]),
383     StdMethod(HRESULT, "GetMaterial", [Out(LPD3DMATERIAL, "lpMat")]),
384     StdMethod(HRESULT, "GetHandle", [(LPDIRECT3DDEVICE, "lpDirect3DDevice"), Out(LPD3DMATERIALHANDLE, "lpHandle")]),
385     StdMethod(HRESULT, "Reserve", []),
386     StdMethod(HRESULT, "Unreserve", []),
387 ]
388
389 IDirect3DMaterial2.methods += [
390     StdMethod(HRESULT, "SetMaterial", [(LPD3DMATERIAL, "lpMat")]),
391     StdMethod(HRESULT, "GetMaterial", [Out(LPD3DMATERIAL, "lpMat")]),
392     StdMethod(HRESULT, "GetHandle", [(LPDIRECT3DDEVICE2, "lpDirect3DDevice2"), Out(LPD3DMATERIALHANDLE, "lpHandle")]),
393 ]
394
395 IDirect3DMaterial3.methods += [
396     StdMethod(HRESULT, "SetMaterial", [(LPD3DMATERIAL, "lpMat")]),
397     StdMethod(HRESULT, "GetMaterial", [Out(LPD3DMATERIAL, "lpMat")]),
398     StdMethod(HRESULT, "GetHandle", [(LPDIRECT3DDEVICE3, "lpDirect3DDevice3"), Out(LPD3DMATERIALHANDLE, "lpHandle")]),
399 ]
400
401 IDirect3DTexture.methods += [
402     StdMethod(HRESULT, "Initialize", [(LPDIRECT3DDEVICE, "lpDirect3DDevice"), (LPDIRECTDRAWSURFACE, "lpDDSurface")]),
403     StdMethod(HRESULT, "GetHandle", [(LPDIRECT3DDEVICE, "lpDirect3DDevice"), Out(LPD3DTEXTUREHANDLE, "lpHandle")]),
404     StdMethod(HRESULT, "PaletteChanged", [(DWORD, "dwStart"), (DWORD, "dwCount")]),
405     StdMethod(HRESULT, "Load", [(LPDIRECT3DTEXTURE, "lpD3DTexture")]),
406     StdMethod(HRESULT, "Unload", []),
407 ]
408
409 IDirect3DTexture2.methods += [
410     StdMethod(HRESULT, "GetHandle", [(LPDIRECT3DDEVICE2, "lpDirect3DDevice2"), Out(LPD3DTEXTUREHANDLE, "lpHandle")]),
411     StdMethod(HRESULT, "PaletteChanged", [(DWORD, "dwStart"), (DWORD, "dwCount")]),
412     StdMethod(HRESULT, "Load", [(LPDIRECT3DTEXTURE2, "lpD3DTexture2")]),
413 ]
414
415 IDirect3DViewport.methods += [
416     StdMethod(HRESULT, "Initialize", [(LPDIRECT3D, "lpDirect3D")]),
417     StdMethod(HRESULT, "GetViewport", [Out(LPD3DVIEWPORT, "lpData")]),
418     StdMethod(HRESULT, "SetViewport", [(LPD3DVIEWPORT, "lpData")]),
419     StdMethod(HRESULT, "TransformVertices", [(DWORD, "dwVertexCount"), (LPD3DTRANSFORMDATA, "lpData"), (DWORD, "dwFlags"), (LPDWORD, "lpOffScreen")]),
420     StdMethod(HRESULT, "LightElements", [(DWORD, "dwElementCount"), (LPD3DLIGHTDATA, "lpData")]),
421     StdMethod(HRESULT, "SetBackground", [(D3DMATERIALHANDLE, "hMat")]),
422     StdMethod(HRESULT, "GetBackground", [Out(LPD3DMATERIALHANDLE, "lphMat"), Out(LPBOOL, "lpValid")]),
423     StdMethod(HRESULT, "SetBackgroundDepth", [(LPDIRECTDRAWSURFACE, "lpDDSurface")]),
424     StdMethod(HRESULT, "GetBackgroundDepth", [Out(Pointer(LPDIRECTDRAWSURFACE), "lplpDDSurface"), Out(LPBOOL, "lpValid")]),
425     StdMethod(HRESULT, "Clear", [(DWORD, "dwCount"), (LPD3DRECT, "lpRects"), (DWORD, "dwFlags")]),
426     StdMethod(HRESULT, "AddLight", [(LPDIRECT3DLIGHT, "lpDirect3DLight")]),
427     StdMethod(HRESULT, "DeleteLight", [(LPDIRECT3DLIGHT, "lpDirect3DLight")]),
428     StdMethod(HRESULT, "NextLight", [(LPDIRECT3DLIGHT, "lpDirect3DLight"), Out(Pointer(LPDIRECT3DLIGHT), "lplpDirect3DLight"), (DWORD, "dwFlags")]),
429 ]
430
431 IDirect3DViewport2.methods += [
432    StdMethod(HRESULT, "GetViewport2", [Out(LPD3DVIEWPORT2, "lpData")]),
433     StdMethod(HRESULT, "SetViewport2", [(LPD3DVIEWPORT2, "lpData")]),
434 ]
435
436 IDirect3DViewport3.methods += [
437     StdMethod(HRESULT, "SetBackgroundDepth2", [(LPDIRECTDRAWSURFACE4, "lpDDS")]),
438     StdMethod(HRESULT, "GetBackgroundDepth2", [Out(Pointer(LPDIRECTDRAWSURFACE4), "lplpDDS"), (LPBOOL, "lpValid")]),
439     StdMethod(HRESULT, "Clear2", [(DWORD, "dwCount"), (LPD3DRECT, "lpRects"), (DWORD, "dwFlags"), (D3DCOLOR, "dwColor"), (D3DVALUE, "dvZ"), (DWORD, "dwStencil")]),
440 ]
441
442 IDirect3DVertexBuffer.methods += [
443     StdMethod(HRESULT, "Lock", [(DWORD, "dwFlags"), Out(Pointer(LPVOID), "lplpData"), (LPDWORD, "lpdwSize")]),
444     StdMethod(HRESULT, "Unlock", []),
445     StdMethod(HRESULT, "ProcessVertices", [(DWORD, "dwVertexOp"), (DWORD, "dwDestIndex"), (DWORD, "dwCount"), (LPDIRECT3DVERTEXBUFFER, "lpSrcBuffer"), (DWORD, "dwSrcIndex"), (LPDIRECT3DDEVICE3, "lpD3DDevice"), (DWORD, "dwFlags")]),
446     StdMethod(HRESULT, "GetVertexBufferDesc", [Out(LPD3DVERTEXBUFFERDESC, "lpD3DVertexBufferDesc")]),
447     StdMethod(HRESULT, "Optimize", [(LPDIRECT3DDEVICE3, "lpD3DDevice"), (DWORD, "dwFlags")]),
448 ]
449
450 IDirect3DVertexBuffer7.methods += [
451     StdMethod(HRESULT, "Lock", [(DWORD, "dwFlags"), Out(Pointer(LPVOID), "lplpData"), (LPDWORD, "lpdwSize")]),
452     StdMethod(HRESULT, "Unlock", []),
453     StdMethod(HRESULT, "ProcessVertices", [(DWORD, "dwVertexOp"), (DWORD, "dwDestIndex"), (DWORD, "dwCount"), (LPDIRECT3DVERTEXBUFFER7, "lpSrcBuffer"), (DWORD, "dwSrcIndex"), (LPDIRECT3DDEVICE7, "lpD3DDevice"), (DWORD, "dwFlags")]),
454     StdMethod(HRESULT, "GetVertexBufferDesc", [Out(LPD3DVERTEXBUFFERDESC, "lpD3DVertexBufferDesc")]),
455     StdMethod(HRESULT, "Optimize", [(LPDIRECT3DDEVICE7, "lpD3DDevice"), (DWORD, "dwFlags")]),
456     StdMethod(HRESULT, "ProcessVerticesStrided", [(DWORD, "dwVertexOp"), (DWORD, "dwDestIndex"), (DWORD, "dwCount"), (LPD3DDRAWPRIMITIVESTRIDEDDATA, "lpStrideData"), (DWORD, "dwVertexTypeDesc"), (LPDIRECT3DDEVICE7, "lpD3DDevice"), (DWORD, "dwFlags")]),
457 ]
458
459 interfaces = [
460     IDirectDraw,
461     IDirectDraw2,
462     IDirectDraw4,
463     IDirectDraw7,
464     IDirect3D,
465     IDirect3D2,
466     IDirect3D3,
467     IDirect3D7,
468 ]
469
470 ddraw.addInterfaces(interfaces)
471