public bool Init(int width, int height, TextureFormat format, byte[] data, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, bool allowRandomAccess, MultiGPUNodeResourceVisibility nodeVisibility)
 {
     depthStencil = new DepthStencil(deviceD3D12, stencilUsage, depthStencilMode);
     if (!depthStencil.Init(width, height, depthStencilFormat, MSAALevel.Disabled))
     {
         return(false);
     }
     return(Init(width, height, format, data, true, allowRandomAccess, MSAALevel.Disabled, nodeVisibility));
 }
Beispiel #2
0
        public override DepthStencilBase CreateDepthStencil(int width, int height, DepthStencilFormat format, StencilUsage stencilUsage, DepthStencilMode mode, MSAALevel msaaLevel)
        {
            var abstraction = new DepthStencil(this, stencilUsage, mode);

            if (!abstraction.Init(width, height, format, msaaLevel))
            {
                abstraction.Dispose();
                throw new Exception("Failed to create DepthStencil");
            }
            return(abstraction);
        }
Beispiel #3
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));
        }