ezEngine Release 26.9
Loading...
Searching...
No Matches
ezWindowOutputTargetGAL Class Reference

Creates a swapchain and keeps it up to date with the window. More...

#include <WindowOutputTarget.h>

Inheritance diagram for ezWindowOutputTargetGAL:

Public Types

using OnSwapChainChanged = ezDelegate< void(ezGALSwapChainHandle hSwapChain, ezSizeU32 size)>
 

Public Member Functions

 ezWindowOutputTargetGAL (OnSwapChainChanged onSwapChainChanged={})
 
void CreateSwapchain (const ezGALWindowSwapChainCreationDescription &desc)
 
virtual void PresentImage (bool bEnableVSync) override
 
virtual void AcquireImage () override
 
virtual ezResult StartCaptureImage () override
 
virtual ezEnum< ezCaptureImageResultWaitCaptureImage (ezImage &out_image) override
 

Public Attributes

ezGALSwapChainHandle m_hSwapChain
 

Detailed Description

Creates a swapchain and keeps it up to date with the window.

If the window is resized or ezGameApplication::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 ezView or uses as render targets in ezGALRenderTargetSetup. 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.

Member Function Documentation

◆ AcquireImage()

void ezWindowOutputTargetGAL::AcquireImage ( )
overridevirtual

◆ PresentImage()

void ezWindowOutputTargetGAL::PresentImage ( bool  bEnableVSync)
overridevirtual

◆ StartCaptureImage()

ezResult ezWindowOutputTargetGAL::StartCaptureImage ( )
overridevirtual

Starts an asynchronous capture of the current back buffer. Returns EZ_FAILURE if a capture is already in flight or if the operation cannot be started.

Implements ezWindowOutputTargetBase.

◆ WaitCaptureImage()

ezEnum< ezCaptureImageResult > ezWindowOutputTargetGAL::WaitCaptureImage ( ezImage out_image)
overridevirtual

Polls the state of a pending capture. Returns Ready once the image data has been copied into out_image.

Implements ezWindowOutputTargetBase.


The documentation for this class was generated from the following files: