![]() |
Plasma Engine
2.0
|
Creates a swapchain and keeps it up to date with the window. More...
#include <WindowOutputTarget.h>
Public Types | |
using | OnSwapChainChanged = plDelegate<void(plGALSwapChainHandle hSwapChain, plSizeU32 size)> |
Public Member Functions | |
plWindowOutputTargetGAL (OnSwapChainChanged onSwapChainChanged={}) | |
void | CreateSwapchain (const plGALWindowSwapChainCreationDescription &desc) |
virtual void | PresentImage (bool bEnableVSync) override |
virtual void | AcquireImage () override |
virtual plResult | CaptureImage (plImage &out_image) override |
Public Attributes | |
OnSwapChainChanged | m_OnSwapChainChanged |
plSizeU32 | m_Size = plSizeU32(0, 0) |
plGALWindowSwapChainCreationDescription | m_currentDesc |
plGALSwapChainHandle | m_hSwapChain |
Creates a swapchain and keeps it up to date with the window.
If the window is resized or plGameApplication::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 plView or uses as render targets in plGALRenderTargetSetup. 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 plWindowOutputTargetBase.
Implements plWindowOutputTargetBase.
|
overridevirtual |
Implements plWindowOutputTargetBase.