Example #1
0
        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);
        }
Example #2
0
        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));
        }
Example #3
0
 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);
Example #4
0
 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();
 }
Example #5
0
        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);
        }
Example #6
0
 public abstract SwapChainBase CreateSwapChain(WindowBase window, int bufferCount, bool fullscreen, bool ensureSizeMatchesWindowSize, SwapChainFormat format, SwapChainType type, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, SwapChainVSyncMode vSyncMode);
Example #7
0
 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));
 }