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));
 }
 public DepthStencil(Device device, StencilUsage usage, DepthStencilMode mode)
     : base(device, usage)
 {
     deviceD3D12 = device;
     handle      = Orbital_Video_D3D12_DepthStencil_Create(device.handle, mode);
 }
示例#3
0
 public override DepthStencilBase CreateDepthStencil(int width, int height, DepthStencilFormat format, StencilUsage stencilUsage, DepthStencilMode mode, MSAALevel msaaLevel)
 {
     throw new NotImplementedException();
 }
示例#4
0
 public override Texture2DBase CreateRenderTexture2D(int width, int height, TextureFormat format, RenderTextureUsage usage, byte[] data, TextureMode mode, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, bool allowRandomAccess, MultiGPUNodeResourceVisibility nodeVisibility)
 {
     throw new NotImplementedException();
 }
示例#5
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();
 }
示例#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);
示例#7
0
 public abstract DepthStencilBase CreateDepthStencil(int width, int height, DepthStencilFormat format, StencilUsage stencilUsage, DepthStencilMode mode, MSAALevel msaaLevel);
示例#8
0
 private unsafe static extern int Orbital_Video_D3D12_RenderPass_Init_WithSwapChain(IntPtr handle, RenderPassDesc_NativeInterop *desc, IntPtr swapChain, IntPtr depthStencil, StencilUsage stencilUsage);
示例#9
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);
        }
示例#10
0
        public override Texture2DBase CreateRenderTexture2D(int width, int height, TextureFormat format, RenderTextureUsage usage, byte[] data, TextureMode mode, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, bool allowRandomAccess, MultiGPUNodeResourceVisibility nodeVisibility)
        {
            var abstraction = new RenderTexture2D(this, usage, mode);

            if (!abstraction.Init(width, height, format, data, stencilUsage, depthStencilFormat, depthStencilMode, allowRandomAccess, nodeVisibility))
            {
                abstraction.Dispose();
                throw new Exception("Failed to create RenderTexture2D");
            }
            return(abstraction);
        }
示例#11
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)
        {
            var abstraction = new SwapChain(this, ensureSizeMatchesWindowSize, type);

            if (!abstraction.Init(window, bufferCount, fullscreen, format, stencilUsage, depthStencilFormat, depthStencilMode, vSyncMode))
            {
                abstraction.Dispose();
                throw new Exception("Failed to create SwapChain");
            }
            return(abstraction);
        }
示例#12
0
 public override DepthStencilBase CreateDepthStencil(int width, int height, DepthStencilFormat format, StencilUsage stencilUsage, DepthStencilMode mode, MSAALevel msaaLevel)
 {
     return(activeDevice.CreateDepthStencil(width, height, format, stencilUsage, mode, msaaLevel));
 }
示例#13
0
 public override Texture2DBase CreateRenderTexture2D(int width, int height, TextureFormat format, RenderTextureUsage usage, byte[] data, TextureMode mode, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, bool allowRandomAccess, MultiGPUNodeResourceVisibility nodeVisibility)
 {
     return(activeDevice.CreateRenderTexture2D(width, height, format, usage, data, mode, stencilUsage, depthStencilFormat, depthStencilMode, allowRandomAccess, nodeVisibility));
 }
示例#14
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));
 }
示例#15
0
 private unsafe static extern int Orbital_Video_D3D12_RenderPass_Init_WithRenderTextures(IntPtr handle, RenderPassDesc_NativeInterop *desc, IntPtr *renderTextures, RenderTextureUsage *usages, uint renderTextureCount, IntPtr depthStencil, StencilUsage stencilUsage);
示例#16
0
 public DepthStencilBase(DeviceBase device, StencilUsage usage)
 {
     this.device       = device;
     this.stencilUsage = usage;
 }
示例#17
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));
        }
示例#18
0
 public abstract Texture2DBase CreateRenderTexture2D(int width, int height, TextureFormat format, RenderTextureUsage usage, byte[] data, TextureMode mode, StencilUsage stencilUsage, DepthStencilFormat depthStencilFormat, DepthStencilMode depthStencilMode, bool allowRandomAccess, MultiGPUNodeResourceVisibility nodeVisibility);