public bool Init(WindowBase window, int bufferCount, bool fullscreen, SwapChainFormat format, SwapChainVSyncMode vSyncMode) { var size = window.GetSize(WindowSizeType.WorkingArea); IntPtr hWnd = window.GetHandle(); if (Orbital_Video_D3D12_SwapChain_Init(handle, hWnd, (uint)size.width, (uint)size.height, (uint)bufferCount, (fullscreen ? 1 : 0), format, vSyncMode) == 0) { return(false); } return(true); }
public bool Init(WindowBase window, int bufferCount, bool fullscreen, SwapChainFormat format, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, SwapChainVSyncMode vSyncMode) { var size = window.GetSize(WindowSizeType.WorkingArea); depthStencilD3D12 = new DepthStencil(deviceD3D12, stencilUsage, depthStencilMode); depthStencil = depthStencilD3D12; if (!depthStencilD3D12.Init(size.width, size.height, depthStencilFormat, MSAALevel.Disabled)) { return(false); } return(Init(window, bufferCount, fullscreen, format, vSyncMode)); }
private static extern int Orbital_Video_D3D12_SwapChain_Init(IntPtr handle, IntPtr hWnd, uint width, uint height, uint bufferCount, int fullscreen, SwapChainFormat format, SwapChainVSyncMode vSyncMode);
public override SwapChainBase CreateSwapChain(WindowBase window, int bufferCount, bool fullscreen, bool ensureSizeMatchesWindowSize, SwapChainFormat format, SwapChainType type, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, SwapChainVSyncMode vSyncMode) { throw new NotImplementedException(); }
public override SwapChainBase CreateSwapChain(WindowBase window, int bufferCount, bool fullscreen, bool ensureSizeMatchesWindowSize, SwapChainFormat format, SwapChainType type, SwapChainVSyncMode vSyncMode) { var abstraction = new SwapChain(this, ensureSizeMatchesWindowSize, type); if (!abstraction.Init(window, bufferCount, fullscreen)) { abstraction.Dispose(); throw new Exception("Failed to create SwapChain"); } return(abstraction); }
public abstract SwapChainBase CreateSwapChain(WindowBase window, int bufferCount, bool fullscreen, bool ensureSizeMatchesWindowSize, SwapChainFormat format, SwapChainType type, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, SwapChainVSyncMode vSyncMode);
public override SwapChainBase CreateSwapChain(WindowBase window, int bufferCount, bool fullscreen, bool ensureSizeMatchesWindowSize, SwapChainFormat format, SwapChainType type, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, SwapChainVSyncMode vSyncMode) { return(primaryDevice.CreateSwapChain(window, bufferCount, fullscreen, ensureSizeMatchesWindowSize, format, type, stencilUsage, depthStencilFormat, depthStencilMode, vSyncMode)); }