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",
40 D3D10_FEATURE_LEVEL1 = Enum("D3D10_FEATURE_LEVEL1", [
41 "D3D10_FEATURE_LEVEL_10_0",
42 "D3D10_FEATURE_LEVEL_10_1",
43 "D3D10_FEATURE_LEVEL_9_1",
44 "D3D10_FEATURE_LEVEL_9_2",
45 "D3D10_FEATURE_LEVEL_9_3",
49 IDXGIAdapter = Alias("IDXGIAdapter", Void)
50 ID3D10Device1 = Alias("ID3D10Device1", Void)
51 IDXGISwapChain = Alias("IDXGISwapChain", Void)
52 DXGI_SWAP_CHAIN_DESC = Alias("DXGI_SWAP_CHAIN_DESC", Void)
54 d3d10_1 = Dll("d3d10")
55 d3d10_1.functions += [
56 DllFunction(HRESULT, "D3D10CreateDevice1", [(Pointer(IDXGIAdapter), "pAdapter"), (D3D10_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (UINT, "Flags"), (D3D10_FEATURE_LEVEL1, "HardwareLevel"), (UINT, "SDKVersion"), (OutPointer(Pointer(ID3D10Device1)), "ppDevice")]),
57 DllFunction(HRESULT, "D3D10CreateDeviceAndSwapChain1", [(Pointer(IDXGIAdapter), "pAdapter"), (D3D10_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (UINT, "Flags"), (D3D10_FEATURE_LEVEL1, "HardwareLevel"), (UINT, "SDKVersion"), (Pointer(DXGI_SWAP_CHAIN_DESC), "pSwapChainDesc"), (OutPointer(Pointer(IDXGISwapChain)), "ppSwapChain"), (OutPointer(Pointer(ID3D10Device1)), "ppDevice")]),
58 DllFunction(HRESULT, "D3D10CreateBlob", [(SIZE_T, "NumBytes"), (OutPointer(LPD3D10BLOB), "ppBuffer")]),
61 if __name__ == '__main__':
62 print '#include <windows.h>'
63 print '#include <tchar.h>'
65 print '#include "compat.h"'
67 print '#include <d3d10_1.h>'
69 print '#include "log.hpp"'