![]() |
XII Release 0.1.0
|
Creates a swapchain and keeps it up to date with the window. More...
#include <WindowOutputTarget.h>
Public Types | |
using | OnSwapChainChanged = xiiDelegate<void(xiiSharedPtr<xiiGALSwapChain> pSwapChain, xiiSizeU32 vSize)> |
Public Member Functions | |
xiiWindowOutputTargetGAL (OnSwapChainChanged onSwapChainChanged={}) | |
void | CreateSwapchain (const xiiGALSwapChainCreationDescription &desc) |
virtual void | PresentImage (bool bEnableVSync) override |
virtual void | AcquireImage () override |
virtual xiiResult | CaptureImage (xiiImage &out_image) override |
Public Attributes | |
OnSwapChainChanged | m_OnSwapChainChanged |
xiiSizeU32 | m_Size = xiiSizeU32(0, 0) |
xiiEnum< xiiGALPresentMode > | m_PresentMode |
xiiGALSwapChainCreationDescription | m_CurrentDesc |
xiiSharedPtr< xiiGALSwapChain > | m_pSwapChain |
xiiUniquePtr< xiiGALImageCapture > | m_pImageCapture |
xiiUInt32 | m_uiCurrentFrame = 0U |
Creates a swapchain and keeps it up to date with the window.
If the window is resized or xiiGameApplication::cvar_AppVSync changes and onSwapChainChanged is valid, the swapchain is destroyed and recreated. It is up the the application to respond to the OnSwapChainChanged callback and update any references to the swap-chain, e.g. uses in xiiView or uses as render targets in xiiGALRenderTargetSetup. If onSwapChainChanged is not set, the swapchain will not be re-created and it is up to the application to manage the swapchain and react to window changes.
|
overridevirtual |
Implements xiiWindowOutputTargetBase.
Implements xiiWindowOutputTargetBase.
|
overridevirtual |
Implements xiiWindowOutputTargetBase.