blob: 4c4c278d00570889a0e7e7fb85d38b3f2dd1c1fc [file] [log] [blame]
José Fonsecad626cf42008-07-07 07:43:16 +09001"""d3d8.h"""
2
3from windows import *
4from d3d8types import *
5from d3d8caps import *
6
7IDirect3D8 = Interface("IDirect3D8", IUnknown)
8IDirect3DDevice8 = Interface("IDirect3DDevice8", IUnknown)
9IDirect3DSwapChain8 = Interface("IDirect3DSwapChain8", IUnknown)
10IDirect3DResource8 = Interface("IDirect3DResource8", IUnknown)
11IDirect3DBaseTexture8 = Interface("IDirect3DBaseTexture8", IDirect3DResource8)
12IDirect3DTexture8 = Interface("IDirect3DTexture8", IDirect3DBaseTexture8)
13IDirect3DVolumeTexture8 = Interface("IDirect3DVolumeTexture8", IDirect3DBaseTexture8)
14IDirect3DCubeTexture8 = Interface("IDirect3DCubeTexture8", IDirect3DBaseTexture8)
15IDirect3DVertexBuffer8 = Interface("IDirect3DVertexBuffer8", IDirect3DResource8)
16IDirect3DIndexBuffer8 = Interface("IDirect3DIndexBuffer8", IDirect3DResource8)
17IDirect3DSurface8 = Interface("IDirect3DSurface8", IUnknown)
18IDirect3DVolume8 = Interface("IDirect3DVolume8", IUnknown)
19
José Fonseca27cd25d2008-07-07 13:44:00 +090020PDIRECT3D8 = WrapPointer(IDirect3D8)
21PDIRECT3DDEVICE8 = WrapPointer(IDirect3DDevice8)
22PDIRECT3DSWAPCHAIN8 = WrapPointer(IDirect3DSwapChain8)
23PDIRECT3DRESOURCE8 = WrapPointer(IDirect3DResource8)
24PDIRECT3DBASETEXTURE8 = WrapPointer(IDirect3DBaseTexture8)
25PDIRECT3DTEXTURE8 = WrapPointer(IDirect3DTexture8)
26PDIRECT3DVOLUMETEXTURE8 = WrapPointer(IDirect3DVolumeTexture8)
27PDIRECT3DCUBETEXTURE8 = WrapPointer(IDirect3DCubeTexture8)
28PDIRECT3DVERTEXBUFFER8 = WrapPointer(IDirect3DVertexBuffer8)
29PDIRECT3DINDEXBUFFER8 = WrapPointer(IDirect3DIndexBuffer8)
30PDIRECT3DSURFACE8 = WrapPointer(IDirect3DSurface8)
31PDIRECT3DVOLUME8 = WrapPointer(IDirect3DVolume8)
José Fonsecad626cf42008-07-07 07:43:16 +090032
33IDirect3D8.methods += [
34 Method(HRESULT, "RegisterSoftwareDevice", [(Pointer(Void), "pInitializeFunction")]),
35 Method(UINT, "GetAdapterCount", []),
36 Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), (Pointer(D3DADAPTER_IDENTIFIER8), "pIdentifier")]),
37 Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter")]),
38 Method(HRESULT, "EnumAdapterModes", [(UINT, "Adapter"), (UINT, "Mode"), (Pointer(D3DDISPLAYMODE), "pMode")]),
39 Method(HRESULT, "GetAdapterDisplayMode", [(UINT, "Adapter"), (Pointer(D3DDISPLAYMODE), "pMode")]),
40 Method(HRESULT, "CheckDeviceType", [(UINT, "Adapter"), (D3DDEVTYPE, "CheckType"), (D3DFORMAT, "DisplayFormat"), (D3DFORMAT, "BackBufferFormat"), (BOOL, "Windowed")]),
41 Method(HRESULT, "CheckDeviceFormat", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (DWORD, "Usage"), (D3DRESOURCETYPE, "RType"), (D3DFORMAT, "CheckFormat")]),
42 Method(HRESULT, "CheckDeviceMultiSampleType", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "SurfaceFormat"), (BOOL, "Windowed"), (D3DMULTISAMPLE_TYPE, "MultiSampleType")]),
43 Method(HRESULT, "CheckDepthStencilMatch", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (D3DFORMAT, "RenderTargetFormat"), (D3DFORMAT, "DepthStencilFormat")]),
44 Method(HRESULT, "GetDeviceCaps", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (Pointer(D3DCAPS8), "pCaps")]),
45 Method(HMONITOR, "GetAdapterMonitor", [(UINT, "Adapter")]),
José Fonseca27cd25d2008-07-07 13:44:00 +090046 Method(HRESULT, "CreateDevice", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), (Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DDEVICE8), "ppReturnedDeviceInterface")]),
José Fonsecad626cf42008-07-07 07:43:16 +090047]
48
49IDirect3DDevice8.methods += [
50 Method(HRESULT, "TestCooperativeLevel", []),
51 Method(UINT, "GetAvailableTextureMem", []),
52 Method(HRESULT, "ResourceManagerDiscardBytes", [(DWORD, "Bytes")]),
José Fonseca27cd25d2008-07-07 13:44:00 +090053 Method(HRESULT, "GetDirect3D", [(Pointer(PDIRECT3D8), "ppD3D8")]),
José Fonsecad626cf42008-07-07 07:43:16 +090054 Method(HRESULT, "GetDeviceCaps", [(Pointer(D3DCAPS8), "pCaps")]),
55 Method(HRESULT, "GetDisplayMode", [(Pointer(D3DDISPLAYMODE), "pMode")]),
56 Method(HRESULT, "GetCreationParameters", [(Pointer(D3DDEVICE_CREATION_PARAMETERS), "pParameters")]),
José Fonseca27cd25d2008-07-07 13:44:00 +090057 Method(HRESULT, "SetCursorProperties", [(UINT, "XHotSpot"), (UINT, "YHotSpot"), (PDIRECT3DSURFACE8, "pCursorBitmap")]),
José Fonsecad626cf42008-07-07 07:43:16 +090058 Method(Void, "SetCursorPosition", [(Int, "X"), (Int, "Y"), (DWORD, "Flags")]),
59 Method(BOOL, "ShowCursor", [(BOOL, "bShow")]),
José Fonseca27cd25d2008-07-07 13:44:00 +090060 Method(HRESULT, "CreateAdditionalSwapChain", [(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DSWAPCHAIN8), "pSwapChain")]),
José Fonsecad626cf42008-07-07 07:43:16 +090061 Method(HRESULT, "Reset", [(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters")]),
62 Method(HRESULT, "Present", [(Pointer(Const(RECT)), "pSourceRect"), (Pointer(Const(RECT)), "pDestRect"), (HWND, "hDestWindowOverride"), (Const(Pointer(RGNDATA)), "pDirtyRegion")]),
José Fonseca27cd25d2008-07-07 13:44:00 +090063 Method(HRESULT, "GetBackBuffer", [(UINT, "BackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE8), "ppBackBuffer")]),
José Fonsecad626cf42008-07-07 07:43:16 +090064 Method(HRESULT, "GetRasterStatus", [(Pointer(D3DRASTER_STATUS), "pRasterStatus")]),
65 Method(Void, "SetGammaRamp", [(DWORD, "Flags"), (Pointer(Const(D3DGAMMARAMP)), "pRamp")]),
66 Method(Void, "GetGammaRamp", [(Pointer(D3DGAMMARAMP), "pRamp")]),
José Fonseca27cd25d2008-07-07 13:44:00 +090067 Method(HRESULT, "CreateTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DTEXTURE8), "ppTexture")]),
68 Method(HRESULT, "CreateVolumeTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Depth"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVOLUMETEXTURE8), "ppVolumeTexture")]),
69 Method(HRESULT, "CreateCubeTexture", [(UINT, "EdgeLength"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DCUBETEXTURE8), "ppCubeTexture")]),
70 Method(HRESULT, "CreateVertexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (DWORD, "FVF"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVERTEXBUFFER8), "ppVertexBuffer")]),
71 Method(HRESULT, "CreateIndexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DINDEXBUFFER8), "ppIndexBuffer")]),
72 Method(HRESULT, "CreateRenderTarget", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (BOOL, "Lockable"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
73 Method(HRESULT, "CreateDepthStencilSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
74 Method(HRESULT, "CreateImageSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
75 Method(HRESULT, "CopyRects", [(PDIRECT3DSURFACE8, "pSourceSurface"), (Pointer(Const(RECT)), "pSourceRectsArray"), (UINT, "cRects"), (PDIRECT3DSURFACE8, "pDestinationSurface"), (Pointer(Const(POINT)), "pDestPointsArray")]),
76 Method(HRESULT, "UpdateTexture", [(PDIRECT3DBASETEXTURE8, "pSourceTexture"), (PDIRECT3DBASETEXTURE8, "pDestinationTexture")]),
77 Method(HRESULT, "GetFrontBuffer", [(PDIRECT3DSURFACE8, "pDestSurface")]),
78 Method(HRESULT, "SetRenderTarget", [(PDIRECT3DSURFACE8, "pRenderTarget"), (PDIRECT3DSURFACE8, "pNewZStencil")]),
79 Method(HRESULT, "GetRenderTarget", [(OutPointer(PDIRECT3DSURFACE8), "ppRenderTarget")]),
80 Method(HRESULT, "GetDepthStencilSurface", [(OutPointer(PDIRECT3DSURFACE8), "ppZStencilSurface")]),
José Fonsecad626cf42008-07-07 07:43:16 +090081 Method(HRESULT, "BeginScene", []),
82 Method(HRESULT, "EndScene", []),
83 Method(HRESULT, "Clear", [(DWORD, "Count"), (Pointer(Const(D3DRECT)), "pRects"), (DWORD, "Flags"), (D3DCOLOR, "Color"), (Float, "Z"), (DWORD, "Stencil")]),
84 Method(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (Pointer(Const(D3DMATRIX)), "pMatrix")]),
85 Method(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (Pointer(D3DMATRIX), "pMatrix")]),
86 Method(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "State"), (Pointer(Const(D3DMATRIX)), "pMatrix")]),
87 Method(HRESULT, "SetViewport", [(Pointer(Const(D3DVIEWPORT8)), "pViewport")]),
88 Method(HRESULT, "GetViewport", [(Pointer(D3DVIEWPORT8), "pViewport")]),
89 Method(HRESULT, "SetMaterial", [(Pointer(Const(D3DMATERIAL8)), "pMaterial")]),
90 Method(HRESULT, "GetMaterial", [(Pointer(D3DMATERIAL8), "pMaterial")]),
91 Method(HRESULT, "SetLight", [(DWORD, "Index"), (Pointer(Const(D3DLIGHT8)), "pLight")]),
92 Method(HRESULT, "GetLight", [(DWORD, "Index"), (Pointer(D3DLIGHT8), "pLight")]),
93 Method(HRESULT, "LightEnable", [(DWORD, "Index"), (BOOL, "Enable")]),
94 Method(HRESULT, "GetLightEnable", [(DWORD, "Index"), (Pointer(BOOL), "pEnable")]),
95 Method(HRESULT, "SetClipPlane", [(DWORD, "Index"), (Pointer(Const(Float)), "pPlane")]),
96 Method(HRESULT, "GetClipPlane", [(DWORD, "Index"), (Pointer(Float), "pPlane")]),
97 Method(HRESULT, "SetRenderState", [(D3DRENDERSTATETYPE, "State"), (DWORD, "Value")]),
98 Method(HRESULT, "GetRenderState", [(D3DRENDERSTATETYPE, "State"), (Pointer(DWORD), "pValue")]),
99 Method(HRESULT, "BeginStateBlock", []),
100 Method(HRESULT, "EndStateBlock", [(Pointer(DWORD), "pToken")]),
101 Method(HRESULT, "ApplyStateBlock", [(DWORD, "Token")]),
102 Method(HRESULT, "CaptureStateBlock", [(DWORD, "Token")]),
103 Method(HRESULT, "DeleteStateBlock", [(DWORD, "Token")]),
104 Method(HRESULT, "CreateStateBlock", [(D3DSTATEBLOCKTYPE, "Type"), (Pointer(DWORD), "pToken")]),
105 Method(HRESULT, "SetClipStatus", [(Pointer(Const(D3DCLIPSTATUS8)), "pClipStatus")]),
106 Method(HRESULT, "GetClipStatus", [(Pointer(D3DCLIPSTATUS8), "pClipStatus")]),
José Fonseca27cd25d2008-07-07 13:44:00 +0900107 Method(HRESULT, "GetTexture", [(DWORD, "Stage"), (OutPointer(PDIRECT3DBASETEXTURE8), "ppTexture")]),
108 Method(HRESULT, "SetTexture", [(DWORD, "Stage"), (PDIRECT3DBASETEXTURE8, "pTexture")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900109 Method(HRESULT, "GetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (Pointer(DWORD), "pValue")]),
110 Method(HRESULT, "SetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (DWORD, "Value")]),
111 Method(HRESULT, "ValidateDevice", [(Pointer(DWORD), "pNumPasses")]),
112 Method(HRESULT, "GetInfo", [(DWORD, "DevInfoID"), (Pointer(Void), "pDevInfoStruct"), (DWORD, "DevInfoStructSize")]),
113 Method(HRESULT, "SetPaletteEntries", [(UINT, "PaletteNumber"), (Pointer(Const(PALETTEENTRY)), "pEntries")]),
114 Method(HRESULT, "GetPaletteEntries", [(UINT, "PaletteNumber"), (Pointer(PALETTEENTRY), "pEntries")]),
115 Method(HRESULT, "SetCurrentTexturePalette", [(UINT, "PaletteNumber")]),
116 Method(HRESULT, "GetCurrentTexturePalette", [(Pointer(UINT), "PaletteNumber")]),
117 Method(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "StartVertex"), (UINT, "PrimitiveCount")]),
118 Method(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "minIndex"), (UINT, "NumVertices"), (UINT, "startIndex"), (UINT, "primCount")]),
119 Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (Const(Pointer(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
120 Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertexIndices"), (UINT, "PrimitiveCount"), (Const(Pointer(Void)), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (Const(Pointer(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
José Fonseca27cd25d2008-07-07 13:44:00 +0900121 Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (PDIRECT3DVERTEXBUFFER8, "pDestBuffer"), (DWORD, "Flags")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900122 Method(HRESULT, "CreateVertexShader", [(Pointer(Const(DWORD)), "pDeclaration"), (Pointer(Const(DWORD)), "pFunction"), (Pointer(DWORD), "pHandle"), (DWORD, "Usage")]),
123 Method(HRESULT, "SetVertexShader", [(DWORD, "Handle")]),
124 Method(HRESULT, "GetVertexShader", [(Pointer(DWORD), "pHandle")]),
125 Method(HRESULT, "DeleteVertexShader", [(DWORD, "Handle")]),
126 Method(HRESULT, "SetVertexShaderConstant", [(DWORD, "Register"), (Const(Pointer(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
127 Method(HRESULT, "GetVertexShaderConstant", [(DWORD, "Register"), (Pointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
128 Method(HRESULT, "GetVertexShaderDeclaration", [(DWORD, "Handle"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]),
129 Method(HRESULT, "GetVertexShaderFunction", [(DWORD, "Handle"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]),
José Fonseca27cd25d2008-07-07 13:44:00 +0900130 Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (PDIRECT3DVERTEXBUFFER8, "pStreamData"), (UINT, "Stride")]),
131 Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), (OutPointer(PDIRECT3DVERTEXBUFFER8), "ppStreamData"), (Pointer(UINT), "pStride")]),
132 Method(HRESULT, "SetIndices", [(PDIRECT3DINDEXBUFFER8, "pIndexData"), (UINT, "BaseVertexIndex")]),
133 Method(HRESULT, "GetIndices", [(OutPointer(PDIRECT3DINDEXBUFFER8), "ppIndexData"), (Pointer(UINT), "pBaseVertexIndex")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900134 Method(HRESULT, "CreatePixelShader", [(Pointer(Const(DWORD)), "pFunction"), (Pointer(DWORD), "pHandle")]),
135 Method(HRESULT, "SetPixelShader", [(DWORD, "Handle")]),
136 Method(HRESULT, "GetPixelShader", [(Pointer(DWORD), "pHandle")]),
137 Method(HRESULT, "DeletePixelShader", [(DWORD, "Handle")]),
138 Method(HRESULT, "SetPixelShaderConstant", [(DWORD, "Register"), (Const(Pointer(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
139 Method(HRESULT, "GetPixelShaderConstant", [(DWORD, "Register"), (Pointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
140 Method(HRESULT, "GetPixelShaderFunction", [(DWORD, "Handle"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]),
141 Method(HRESULT, "DrawRectPatch", [(UINT, "Handle"), (Pointer(Const(Float)), "pNumSegs"), (Pointer(Const(D3DRECTPATCH_INFO)), "pRectPatchInfo")]),
142 Method(HRESULT, "DrawTriPatch", [(UINT, "Handle"), (Pointer(Const(Float)), "pNumSegs"), (Pointer(Const(D3DTRIPATCH_INFO)), "pTriPatchInfo")]),
143 Method(HRESULT, "DeletePatch", [(UINT, "Handle")]),
144]
145
146IDirect3DSwapChain8.methods += [
147 Method(HRESULT, "Present", [(Pointer(Const(RECT)), "pSourceRect"), (Pointer(Const(RECT)), "pDestRect"), (HWND, "hDestWindowOverride"), (Const(Pointer(RGNDATA)), "pDirtyRegion")]),
José Fonseca27cd25d2008-07-07 13:44:00 +0900148 Method(HRESULT, "GetBackBuffer", [(UINT, "BackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE8), "ppBackBuffer")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900149]
150
151IDirect3DResource8.methods += [
José Fonseca27cd25d2008-07-07 13:44:00 +0900152 Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900153 Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Const(Pointer(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
154 Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]),
155 Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
156 Method(DWORD, "SetPriority", [(DWORD, "PriorityNew")]),
157 Method(DWORD, "GetPriority", []),
158 Method(Void, "PreLoad", []),
159 Method(D3DRESOURCETYPE, "GetType", []),
160]
161
162IDirect3DBaseTexture8.methods += [
163 Method(DWORD, "SetLOD", [(DWORD, "LODNew")]),
164 Method(DWORD, "GetLOD", []),
165 Method(DWORD, "GetLevelCount", []),
166]
167
168IDirect3DTexture8.methods += [
169 Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (Pointer(D3DSURFACE_DESC), "pDesc")]),
José Fonseca27cd25d2008-07-07 13:44:00 +0900170 Method(HRESULT, "GetSurfaceLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DSURFACE8), "ppSurfaceLevel")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900171 Method(HRESULT, "LockRect", [(UINT, "Level"), (Pointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]),
172 Method(HRESULT, "UnlockRect", [(UINT, "Level")]),
173 Method(HRESULT, "AddDirtyRect", [(Pointer(Const(RECT)), "pDirtyRect")]),
174]
175
176IDirect3DVolumeTexture8.methods += [
177 Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (Pointer(D3DVOLUME_DESC), "pDesc")]),
José Fonseca27cd25d2008-07-07 13:44:00 +0900178 Method(HRESULT, "GetVolumeLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DVOLUME8), "ppVolumeLevel")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900179 Method(HRESULT, "LockBox", [(UINT, "Level"), (Pointer(D3DLOCKED_BOX), "pLockedVolume"), (Pointer(Const(D3DBOX)), "pBox"), (DWORD, "Flags")]),
180 Method(HRESULT, "UnlockBox", [(UINT, "Level")]),
181 Method(HRESULT, "AddDirtyBox", [(Pointer(Const(D3DBOX)), "pDirtyBox")]),
182]
183
184IDirect3DCubeTexture8.methods += [
185 Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (Pointer(D3DSURFACE_DESC), "pDesc")]),
José Fonseca27cd25d2008-07-07 13:44:00 +0900186 Method(HRESULT, "GetCubeMapSurface", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (OutPointer(PDIRECT3DSURFACE8), "ppCubeMapSurface")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900187 Method(HRESULT, "LockRect", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (Pointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]),
188 Method(HRESULT, "UnlockRect", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level")]),
189 Method(HRESULT, "AddDirtyRect", [(D3DCUBEMAP_FACES, "FaceType"), (Pointer(Const(RECT)), "pDirtyRect")]),
190]
191
192IDirect3DVertexBuffer8.methods += [
193 Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (Pointer(Pointer(BYTE)), "ppbData"), (DWORD, "Flags")]),
194 Method(HRESULT, "Unlock", []),
195 Method(HRESULT, "GetDesc", [(Pointer(D3DVERTEXBUFFER_DESC), "pDesc")]),
196]
197
198IDirect3DIndexBuffer8.methods += [
199 Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (Pointer(Pointer(BYTE)), "ppbData"), (DWORD, "Flags")]),
200 Method(HRESULT, "Unlock", []),
201 Method(HRESULT, "GetDesc", [(Pointer(D3DINDEXBUFFER_DESC), "pDesc")]),
202]
203
204IDirect3DSurface8.methods += [
José Fonseca27cd25d2008-07-07 13:44:00 +0900205 Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900206 Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Const(Pointer(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
207 Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]),
208 Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
209 Method(HRESULT, "GetContainer", [(REFIID, "riid"), (Pointer(Pointer(Void)), "ppContainer")]),
210 Method(HRESULT, "GetDesc", [(Pointer(D3DSURFACE_DESC), "pDesc")]),
211 Method(HRESULT, "LockRect", [(Pointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]),
212 Method(HRESULT, "UnlockRect", []),
213]
214
215IDirect3DVolume8.methods += [
José Fonseca27cd25d2008-07-07 13:44:00 +0900216 Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900217 Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Const(Pointer(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
218 Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]),
219 Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
220 Method(HRESULT, "GetContainer", [(REFIID, "riid"), (Pointer(Pointer(Void)), "ppContainer")]),
221 Method(HRESULT, "GetDesc", [(Pointer(D3DVOLUME_DESC), "pDesc")]),
222 Method(HRESULT, "LockBox", [(Pointer(D3DLOCKED_BOX), "pLockedVolume"), (Pointer(Const(D3DBOX)), "pBox"), (DWORD, "Flags")]),
223 Method(HRESULT, "UnlockBox", []),
224]
225
226d3d8 = Dll("d3d8")
227d3d8.functions += [
José Fonseca27cd25d2008-07-07 13:44:00 +0900228 Function(PDIRECT3D8, "Direct3DCreate8", [(UINT, "SDKVersion")]),
José Fonsecad626cf42008-07-07 07:43:16 +0900229]
230
231if __name__ == '__main__':
232 print '#include <windows.h>'
233 print '#include <tchar.h>'
234 print '#include <d3d8.h>'
235 print
236 print '#include "log.hpp"'
237 print
238 wrap()
239