Plasma Engine  2.0
Loading...
Searching...
No Matches
plGALSharedTextureSwapChain Class Reference

Use to render to a set of shared textures. To use it, it needs to be armed with the next shared texture index and its current semaphore value. More...

#include <SharedTextureSwapChain.h>

Inheritance diagram for plGALSharedTextureSwapChain:

Public Types

using Functor = plDelegate<plGALSwapChainHandle(const plGALSharedTextureSwapChainCreationDescription&)>
 

Public Member Functions

void Arm (plUInt32 uiTextureIndex, plUInt64 uiCurrentSemaphoreValue)
 Call this before rendering.
 
- Public Member Functions inherited from plGALSwapChain
const plGALRenderTargetsGetRenderTargets () const
 
plGALTextureHandle GetBackBufferTexture () const
 
plSizeU32 GetCurrentSize () const
 
- Public Member Functions inherited from plGALObject< plGALSwapChainCreationDescription >
 plGALObject (const plGALSwapChainCreationDescription &description)
 
PL_ALWAYS_INLINE const plGALSwapChainCreationDescriptionGetDescription () const
 
- Public Member Functions inherited from plRefCounted
virtual ~plRefCounted ()=default
 Adds a virtual destructor.
 
- Public Member Functions inherited from plRefCountingImpl
 plRefCountingImpl ()=default
 Constructor.
 
 plRefCountingImpl (const plRefCountingImpl &rhs)
 
void operator= (const plRefCountingImpl &rhs)
 
plInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
 
plInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.
 
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
 
plInt32 GetRefCount () const
 Returns the current reference count.
 

Static Public Member Functions

static void SetFactoryMethod (Functor factory)
 
static plGALSwapChainHandle Create (const plGALSharedTextureSwapChainCreationDescription &desc)
 Creates an instance of a plGALSharedTextureSwapChain.
 

Protected Member Functions

 plGALSharedTextureSwapChain (const plGALSharedTextureSwapChainCreationDescription &desc)
 
virtual void AcquireNextRenderTarget (plGALDevice *pDevice) override
 
virtual void PresentRenderTarget (plGALDevice *pDevice) override
 
virtual plResult UpdateSwapChain (plGALDevice *pDevice, plEnum< plGALPresentMode > newPresentMode) override
 
virtual plResult InitPlatform (plGALDevice *pDevice) override
 
virtual plResult DeInitPlatform (plGALDevice *pDevice) override
 
- Protected Member Functions inherited from plGALSwapChain
 plGALSwapChain (const plRTTI *pSwapChainType)
 

Protected Attributes

plUInt32 m_uiCurrentTexture = plMath::MaxValue<plUInt32>()
 
plUInt64 m_uiCurrentSemaphoreValue = 0
 
plHybridArray< plGALTextureHandle, 3 > m_SharedTextureHandles
 
plHybridArray< const plGALSharedTexture *, 3 > m_SharedTextureInterfaces
 
plHybridArray< plUInt64, 3 > m_CurrentSemaphoreValue
 
plGALSharedTextureSwapChainCreationDescription m_Desc = {}
 
- Protected Attributes inherited from plGALSwapChain
plGALRenderTargets m_RenderTargets
 
plSizeU32 m_CurrentSize = {}
 
- Protected Attributes inherited from plGALObject< plGALSwapChainCreationDescription >
const plGALSwapChainCreationDescription m_Description
 

Static Protected Attributes

static Functor s_Factory
 

Friends

class plGALDevice
 

Detailed Description

Use to render to a set of shared textures. To use it, it needs to be armed with the next shared texture index and its current semaphore value.

Member Function Documentation

◆ AcquireNextRenderTarget()

void plGALSharedTextureSwapChain::AcquireNextRenderTarget ( plGALDevice * pDevice)
overrideprotectedvirtual

Implements plGALSwapChain.

◆ Arm()

void plGALSharedTextureSwapChain::Arm ( plUInt32 uiTextureIndex,
plUInt64 uiCurrentSemaphoreValue )

Call this before rendering.

Parameters
uiTextureIndexTexture to render into.
uiCurrentSemaphoreValueCurrent semaphore value of the texture.

◆ DeInitPlatform()

plResult plGALSharedTextureSwapChain::DeInitPlatform ( plGALDevice * pDevice)
overrideprotectedvirtual

Implements plGALSwapChain.

◆ InitPlatform()

plResult plGALSharedTextureSwapChain::InitPlatform ( plGALDevice * pDevice)
overrideprotectedvirtual

Implements plGALSwapChain.

◆ PresentRenderTarget()

void plGALSharedTextureSwapChain::PresentRenderTarget ( plGALDevice * pDevice)
overrideprotectedvirtual

Implements plGALSwapChain.

◆ UpdateSwapChain()

plResult plGALSharedTextureSwapChain::UpdateSwapChain ( plGALDevice * pDevice,
plEnum< plGALPresentMode > newPresentMode )
overrideprotectedvirtual

Implements plGALSwapChain.


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