1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! FFI bindings to d3d11. #![cfg(windows)] extern crate winapi; use winapi::*; #[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "arm"))] extern "system" { // pub fn D3D11CoreCreateDevice(); // pub fn D3D11CoreCreateLayeredDevice(); // pub fn D3D11CoreGetLayeredDeviceSize(); // pub fn D3D11CoreRegisterLayers(); pub fn D3D11CreateDevice( pAdapter: *mut IDXGIAdapter, DriverType: D3D_DRIVER_TYPE, Software: HMODULE, Flags: UINT, pFeatureLevels: *const D3D_FEATURE_LEVEL, FeatureLevels: UINT, SDKVersion: UINT, ppDevice: *mut *mut ID3D11Device, pFeatureLevel: *mut D3D_FEATURE_LEVEL, ppImmediateContext: *mut *mut ID3D11DeviceContext ) -> HRESULT; pub fn D3D11CreateDeviceAndSwapChain( pAdapter: *mut IDXGIAdapter, DriverType: D3D_DRIVER_TYPE, Software: HMODULE, Flags: UINT, pFeatureLevels: *const D3D_FEATURE_LEVEL, FeatureLevels: UINT, SDKVersion: UINT, pSwapChainDesc: *const DXGI_SWAP_CHAIN_DESC, ppSwapChain: *mut *mut IDXGISwapChain, ppDevice: *mut *mut ID3D11Device, pFeatureLevel: *mut D3D_FEATURE_LEVEL, ppImmediateContext: *mut *mut ID3D11DeviceContext ) -> HRESULT; // pub fn D3DKMTCreateAllocation(); // pub fn D3DKMTCreateContext(); // pub fn D3DKMTCreateDevice(); // pub fn D3DKMTCreateSynchronizationObject(); // pub fn D3DKMTEscape(); // pub fn D3DKMTGetContextSchedulingPriority(); // pub fn D3DKMTGetDeviceState(); // pub fn D3DKMTGetDisplayModeList(); // pub fn D3DKMTGetMultisampleMethodList(); // pub fn D3DKMTGetRuntimeData(); // pub fn D3DKMTGetSharedPrimaryHandle(); // pub fn D3DKMTLock(); // pub fn D3DKMTOpenAdapterFromHdc(); // pub fn D3DKMTOpenResource(); // pub fn D3DKMTPresent(); // pub fn D3DKMTQueryAllocationResidency(); // pub fn D3DKMTQueryResourceInfo(); // pub fn D3DKMTRender(); // pub fn D3DKMTSetAllocationPriority(); // pub fn D3DKMTSetContextSchedulingPriority(); // pub fn D3DKMTSetDisplayMode(); // pub fn D3DKMTSetGammaRamp(); // pub fn D3DKMTSetVidPnSourceOwner(); // pub fn D3DKMTWaitForVerticalBlankEvent(); }