----------------------------------------
-- File : d3d10misc.ads --
-- Translator:Dongfeng.Gu,2018/10/21 --
-- Mail: 515639@qq.com --
-- Progress:100% --
----------------------------------------
with win32; use win32;
with win32.rpcdce; use win32.rpcdce;
with win32.windef; use win32.windef;
with Win32.objbase; use win32.objbase;
with DXGI; use DXGI;
with d3d10; use d3d10;
package d3d10misc is
type ID3D10BLOB;
type LPID3D10BLOB is access all ID3D10Blob;
type LPLPID3D10BLOB is access all LPID3D10BLOB;
subtype LPD3D10BLOB is LPID3D10Blob;
subtype LPLPD3D10BLOB is LPLPID3D10BLOB;
IID_ID3D10Blob:constant win32.rpcdce.GUID:=(16#8ba5fb08#,16#5195#,16#40e2#,(16#ac#,16#58#,16#d#,16#98#,16#9c#,16#3a#,16#1#,16#2#));
type ID3D10Blob is record
QueryInterface:access procedure(THIS:LPID3D10Blob;iid:REFIID;ppv:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPID3D10Blob) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPID3D10Blob) return ULONG with Convention=>Stdcall;
GetBufferPointer:access function(THIS:LPID3D10Blob) return LPVOID with Convention=>Stdcall;
GetBufferSize:access function(THIS:LPID3D10Blob) return SIZE_T with Convention=>Stdcall;
end record;
type D3D10_DRIVER_TYPE is (D3D10_DRIVER_TYPE_HARDWARE,
D3D10_DRIVER_TYPE_REFERENCE,
D3D10_DRIVER_TYPE_NULL,
D3D10_DRIVER_TYPE_SOFTWARE,
D3D10_DRIVER_TYPE_WARP);
for D3D10_DRIVER_TYPE use (D3D10_DRIVER_TYPE_HARDWARE=>0,
D3D10_DRIVER_TYPE_REFERENCE=>1,
D3D10_DRIVER_TYPE_NULL=>2,
D3D10_DRIVER_TYPE_SOFTWARE=>3,
D3D10_DRIVER_TYPE_WARP=>5);
type LPD3D10_DRIVER_TYPE is access D3D10_DRIVER_TYPE;
GUID_DeviceType:constant win32.rpcdce.GUID:=(16#d722fb4d#,16#7a68#,16#437a#,(16#b2#,16#0c#,16#58#,16#04#,16#ee#,16#24#,16#94#,16#a6#));
function D3D10CreateDevice(pAdapter:LPIDXGIAdapter;DriverType:D3D10_DRIVER_TYPE;Software:HMODULE;Flags:UINT;SDKVersion:UINT;ppDevice:LPLPID3D10Device) return HRESULT with Import,Convention=>stdcall,external_name=>"D3D10CreateDevice";
function D3D10CreateDeviceAndSwapChain(pAdapter:LPIDXGIAdapter;DriverType:D3D10_DRIVER_TYPE;Software:HMODULE;Flags:UINT;SDKVersion:UINT;pSwapChainDesc:LPDXGI_SWAP_CHAIN_DESC;ppSwapChain:LPLPIDXGISwapChain;ppDevice:LPLPID3D10Device) return HRESULT with Import,Convention=>stdcall,external_name=>"D3D10CreateDeviceAndSwapChain";
function D3D10CreateBlob(NumBytes:SIZE_T;ppBuffer:LPLPD3D10BLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3D10CreateBlob";
--
-- THE END.
--
end d3d10misc;