nCine::RHI::AuxiliarySwapchainDesc struct

What Device::CreateAuxiliarySwapchain() needs of a window besides the main one.

Filled by the window backend, see nCine::AuxiliaryWindow. Each graphics backend uses only its part: Direct3D 11, Vulkan and Metal create their swap chain from WindowHandle, OpenGL draws into a context of the window that shares the objects of the main one through the three functions.

Public variables

void* WindowHandle
Native window of the graphics backend.
Death::Containers::Function<bool()> MakeCurrent
OpenGL: makes the context of the window current, it shares the objects of the main one.
Death::Containers::Function<void()> SwapBuffers
OpenGL: shows what was drawn into the window.
Death::Containers::Function<void()> RestoreMain
OpenGL: makes the context of the main window current again.

Variable documentation

void* nCine::RHI::AuxiliarySwapchainDesc::WindowHandle

Native window of the graphics backend.

The HWND for Direct3D 11, the SDL_Window* for Vulkan and Metal, unused for OpenGL.