engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments > 模板类 参考

A resource pool that automatically handles render-thread resources 更多...

#include <ResourcePool.h>

+ 类 TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments > 继承关系图:

Public 成员函数

ResourceType CreatePooledResource (ResourceCreationArguments Args)
 Creates a pooled resource. 更多...
 
virtual void InitRHI () override
 Initializes the RHI resources used by this resource. 更多...
 
virtual bool IsTickable () const override
 Pure virtual that must be overloaded by the inheriting class. 更多...
 
virtual bool NeedsRenderingResumedForRenderingThreadTick () const override
 Used to determine if a rendering thread tickable object must have rendering in a non-suspended state during it's Tick function. 更多...
 
void ReleasePooledResource (ResourceType Resource)
 Release a resource back into the pool. 更多...
 
virtual void ReleaseRHI () override
 Releases the RHI resources used by this resource. 更多...
 
virtual void Tick (float DeltaTime) override
 Pure virtual that must be overloaded by the inheriting class. 更多...
 
 TRenderResourcePool ()
 Constructor
 
 TRenderResourcePool (ResourcePoolPolicy InPolicy)
 Constructor with policy argument 更多...
 
virtual ~TRenderResourcePool ()
 Destructor
 
- Public 成员函数 继承自 TResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >
ResourceType CreatePooledResource (ResourceCreationArguments Args)
 Creates a pooled resource. 更多...
 
void DrainPool (bool bForceDrainAll)
 Drain the pool of freed resources that need to be culled or prepared for reuse. 更多...
 
uint32 PooledSizeForCreationArguments (ResourceCreationArguments Args)
 Gets the size a pooled object will use when constructed from the pool. 更多...
 
void ReleasePooledResource (const ResourceType &Resource)
 Release a resource back into the pool. 更多...
 
 TResourcePool ()
 Constructor
 
 TResourcePool (ResourcePoolPolicy InPolicy)
 Constructor with policy argument 更多...
 
virtual ~TResourcePool ()
 Destructor
 
- Public 成员函数 继承自 FTickableObjectRenderThread
 FTickableObjectRenderThread (bool bRegisterImmediately=true, bool bInHighFrequency=false)
 Registers this instance with the static array of tickable objects. 更多...
 
virtual TStatId GetStatId () const =0
 return the stat id to use for this tickable
 
virtual bool IsTickable () const =0
 Pure virtual that must be overloaded by the inheriting class. 更多...
 
virtual bool NeedsRenderingResumedForRenderingThreadTick () const
 Used to determine if a rendering thread tickable object must have rendering in a non-suspended state during it's Tick function. 更多...
 
void Register (bool bIsRenderingThreadObject=false)
 Registers the object for ticking. 更多...
 
virtual void Tick (float DeltaTime)=0
 Pure virtual that must be overloaded by the inheriting class. 更多...
 
virtual ~FTickableObjectRenderThread ()
 Removes this instance from the static array of tickable objects.
 
- Public 成员函数 继承自 FRenderResource
 FRenderResource ()
 Default constructor.
 
 FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 Constructor when we know what feature level this resource should support
 
virtual FString GetFriendlyName () const
 
virtual void InitDynamicRHI ()
 Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多...
 
virtual void InitResource ()
 Initializes the resource. 更多...
 
virtual void InitRHI ()
 Initializes the RHI resources used by this resource. 更多...
 
virtual void ReleaseDynamicRHI ()
 Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多...
 
virtual void ReleaseResource ()
 Prepares the resource for deletion. 更多...
 
virtual void ReleaseRHI ()
 Releases the RHI resources used by this resource. 更多...
 
void UpdateRHI ()
 If the resource's RHI resources have been initialized, then release and reinitialize it. 更多...
 
virtual ~FRenderResource ()
 Destructor used to catch unreleased resources.
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 FRenderResource
static void InitPreRHIResources ()
 Initialize all resources initialized before the RHI was initialized
 

详细描述

template<typename ResourceType, class ResourcePoolPolicy, class ResourceCreationArguments>
class TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >

A resource pool that automatically handles render-thread resources

构造及析构函数说明

◆ TRenderResourcePool()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::TRenderResourcePool ( ResourcePoolPolicy  InPolicy)
inline

Constructor with policy argument

参数
InPolicyAn initialised policy object

成员函数说明

◆ CreatePooledResource()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
ResourceType TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::CreatePooledResource ( ResourceCreationArguments  Args)
inline

Creates a pooled resource.

参数
Argsthe argument object for construction.
返回
An initialised resource or the policy's NullResource if not initialised.

◆ InitRHI()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
virtual void TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::InitRHI ( )
inlineoverridevirtual

Initializes the RHI resources used by this resource.

Called when entering the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

重载 FRenderResource .

◆ IsTickable()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
virtual bool TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::IsTickable ( ) const
inlineoverridevirtual

Pure virtual that must be overloaded by the inheriting class.

It is used to determine whether an object is ready to be ticked. This is required for example for all UObject derived classes as they might be loaded async and therefore won't be ready immediately.

返回
true if class is ready to be ticked, false otherwise.

实现了 FTickableObjectRenderThread.

◆ NeedsRenderingResumedForRenderingThreadTick()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
virtual bool TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::NeedsRenderingResumedForRenderingThreadTick ( ) const
inlineoverridevirtual

Used to determine if a rendering thread tickable object must have rendering in a non-suspended state during it's Tick function.

返回
true if the RHIResumeRendering should be called before tick if rendering has been suspended

重载 FTickableObjectRenderThread .

◆ ReleasePooledResource()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
void TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::ReleasePooledResource ( ResourceType  Resource)
inline

Release a resource back into the pool.

参数
ResourceThe resource to return to the pool

◆ ReleaseRHI()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
virtual void TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::ReleaseRHI ( )
inlineoverridevirtual

Releases the RHI resources used by this resource.

Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

重载 FRenderResource .

◆ Tick()

template<typename ResourceType , class ResourcePoolPolicy , class ResourceCreationArguments >
virtual void TRenderResourcePool< ResourceType, ResourcePoolPolicy, ResourceCreationArguments >::Tick ( float  DeltaTime)
inlineoverridevirtual

Pure virtual that must be overloaded by the inheriting class.

It will be called from within LevelTick.cpp after ticking all actors or from the rendering thread (depending on bIsRenderingThreadObject)

参数
DeltaTimeGame time passed since the last call.

实现了 FTickableObjectRenderThread.


该类的文档由以下文件生成: