コード例 #1
0
        internal bool GetWindowSwapChain(out SwapChainHandle swapChain)
        {
            SwapChainHandle outSCPtr;

            unsafe {
                char *failReason = stackalloc char[InteropUtils.MAX_INTEROP_FAIL_REASON_STRING_LENGTH + 1];
                bool  success    = NativeMethods.WindowFactory_GetWindowSwapChain((IntPtr)failReason, WindowHandle, (IntPtr)(&outSCPtr));
                if (!success)
                {
                    throw new NativeOperationFailedException(Marshal.PtrToStringUni((IntPtr)failReason));
                }
            }

            // If window was closed, sc handle will be null
            if (outSCPtr == SwapChainHandle.NULL)
            {
                swapChain = SwapChainHandle.NULL;
                return(false);
            }

            swapChain = outSCPtr;
            return(true);
        }
コード例 #2
0
 public static extern InteropBool RenderPassManager_PresentBackBuffer(
     IntPtr failReason,
     SwapChainHandle swapChainHandle
     );