1 #############################################################################
3 # Copyright 2009 VMware, Inc.
5 # This program is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published
7 # by the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program 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
13 # GNU Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #############################################################################
24 ID3D10Blob = Interface("ID3D10Blob", IUnknown)
25 LPD3D10BLOB = Pointer(ID3D10Blob)
27 ID3D10Blob.methods += [
28 Method(LPVOID, "GetBufferPointer", []),
29 Method(SIZE_T, "GetBufferSize", []),
32 D3D10_DRIVER_TYPE = Enum("D3D10_DRIVER_TYPE", [
33 "D3D10_DRIVER_TYPE_HARDWARE",
34 "D3D10_DRIVER_TYPE_REFERENCE",
35 "D3D10_DRIVER_TYPE_NULL",
36 "D3D10_DRIVER_TYPE_SOFTWARE",
37 "D3D10_DRIVER_TYPE_WARP",
41 IDXGIAdapter = Alias("IDXGIAdapter", Void)
42 ID3D10Device = Alias("ID3D10Device", Void)
43 IDXGISwapChain = Alias("IDXGISwapChain", Void)
44 DXGI_SWAP_CHAIN_DESC = Alias("DXGI_SWAP_CHAIN_DESC", Void)
48 DllFunction(HRESULT, "D3D10CreateDevice", [(Pointer(IDXGIAdapter), "pAdapter"), (D3D10_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (UINT, "Flags"), (UINT, "SDKVersion"), (OutPointer(Pointer(ID3D10Device)), "ppDevice")]),
49 DllFunction(HRESULT, "D3D10CreateDeviceAndSwapChain", [(Pointer(IDXGIAdapter), "pAdapter"), (D3D10_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (UINT, "Flags"), (UINT, "SDKVersion"), (Pointer(DXGI_SWAP_CHAIN_DESC), "pSwapChainDesc"), (OutPointer(Pointer(IDXGISwapChain)), "ppSwapChain"), (OutPointer(Pointer(ID3D10Device)), "ppDevice")]),
50 DllFunction(HRESULT, "D3D10CreateBlob", [(SIZE_T, "NumBytes"), (OutPointer(LPD3D10BLOB), "ppBuffer")]),
53 if __name__ == '__main__':
54 print '#include <windows.h>'
55 print '#include <tchar.h>'
57 print '#include "compat.h"'
59 print '#include <d3d10.h>'
61 print '#include "log.hpp"'