public static D3d.Device CreateDevice( Settings deviceSettings, System.Windows.Forms.Control renderWindow) { EnumerateAdapters(); // First try full hardware acceleration. D3d.PresentParameters presentParams = deviceSettings.GetPresentParameters( renderWindow ); D3d.CreateFlags createFlags = deviceSettings.GetCreateFlags(true,true); D3d.Device d3dDevice = CreateDevice( renderWindow,presentParams,createFlags,deviceSettings ); if (d3dDevice == null) { log.Warning("Pure device not available."); createFlags = deviceSettings.GetCreateFlags(false,true); d3dDevice = CreateDevice( renderWindow,presentParams,createFlags,deviceSettings ); if (d3dDevice == null) { log.Warning("Hardware vertex processing not available."); createFlags = deviceSettings.GetCreateFlags( false,false ); d3dDevice = CreateDevice( renderWindow,presentParams,createFlags,deviceSettings ); } } return d3dDevice; }
public static D3d.Device CreateDevice(Settings deviceSettings, System.Windows.Forms.Control renderWindow) { EnumerateAdapters(); // First try full hardware acceleration. D3d.PresentParameters presentParams = deviceSettings.GetPresentParameters(renderWindow); D3d.CreateFlags createFlags = deviceSettings.GetCreateFlags(true, true); D3d.Device d3dDevice = CreateDevice(renderWindow, presentParams, createFlags, deviceSettings); if (d3dDevice == null) { log.Warning("Pure device not available."); createFlags = deviceSettings.GetCreateFlags(false, true); d3dDevice = CreateDevice(renderWindow, presentParams, createFlags, deviceSettings); if (d3dDevice == null) { log.Warning("Hardware vertex processing not available."); createFlags = deviceSettings.GetCreateFlags(false, false); d3dDevice = CreateDevice(renderWindow, presentParams, createFlags, deviceSettings); } } return(d3dDevice); }
public static FrameBuffer Create(Settings settings, D3d.Device device, System.Windows.Forms.Control renderWindow) { D3d.SwapChain swapChain = new D3d.SwapChain( device,settings.GetPresentParameters(renderWindow) ); return null; }
public static FrameBuffer Create(Settings settings, D3d.Device device, System.Windows.Forms.Control renderWindow) { D3d.SwapChain swapChain = new D3d.SwapChain(device, settings.GetPresentParameters(renderWindow)); return(null); }