/// <summary> /// Creates a headless SwapChain. /// </summary> /// <param name="width">Width of the drawing buffer in pixels.</param> /// <param name="height">Height of the drawing buffer in pixels.</param> /// <param name="flags">One or more configuration flags.</param> /// <returns>The newly created SwapChain or null if it couldn't be created.</returns> public SwapChain CreateSwapChain(int width, int height, SwapChainConfig flags = SwapChainConfig.None) { ThrowExceptionIfDisposed(); return(SwapChain.GetOrCreateCache( Native.Engine.CreateSwapChainHeadless(NativePtr, width, height, (uint)flags) )); }
/// <summary> /// Creates a SwapChain from the given Operating System's native window handle. /// </summary> /// <param name="nativeWindow">An opaque native window handle. e.g.: on Android this is an `ANativeWindow*`.</param> /// <param name="flags">One or more configuration flags.</param> /// <returns>The newly created SwapChain or null if it couldn't be created.</returns> public SwapChain CreateSwapChain(IntPtr nativeWindow, SwapChainConfig flags = SwapChainConfig.None) { ThrowExceptionIfDisposed(); return(SwapChain.GetOrCreateCache( Native.Engine.CreateSwapChain(NativePtr, nativeWindow, (uint)flags) )); }