Encapsulates the render targets pools that allows easy sharing (mostly used on the render thread side) 更多...
#include <RenderTargetPool.h>
类 FRenderTargetPool 继承关系图:Public 成员函数 | |
| void | DestructSnapshots () |
| Destruct all snapshots, this must be done after all outstanding async tasks are done. 更多... | |
| bool | FindFreeElement (FRHICommandList &RHICmdList, const FPooledRenderTargetDesc &Desc, TRefCountPtr< IPooledRenderTarget > &Out, const TCHAR *InDebugName, ERenderTargetTransience TransienceHint=ERenderTargetTransience::Transient, bool bDeferTextureAllocation=false) |
| void | FreeUnusedResource (TRefCountPtr< IPooledRenderTarget > &In) |
| Allows to remove a resource so it cannot be shared and gets released immediately instead a/some frame[s] later. | |
| void | FreeUnusedResources () |
| Good to call between levels or before memory intense operations. | |
| void | GetStats (uint32 &OutWholeCount, uint32 &OutWholePoolInKB, uint32 &OutUsedInKB) const |
| Only to get statistics on usage and free elements. 更多... | |
| IPooledRenderTarget * | MakeSnapshot (const TRefCountPtr< IPooledRenderTarget > &In) |
| Destruct all snapshots, this must be done after all outstanding async tasks are done. 更多... | |
| void | ReleaseDynamicRHI () |
| Free renderer resources | |
| void | TickPoolElements () |
| Can release RT, should be called once per frame. 更多... | |
| void | TransitionTargetsWritable (FRHICommandListImmediate &RHICmdList) |
| Transitions all targets in the pool to writable. | |
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. | |
友元 | |
| struct | FPooledRenderTarget |
| class | FRDGBuilder |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 FRenderResource | |
| static void | InitPreRHIResources () |
| Initialize all resources initialized before the RHI was initialized | |
Encapsulates the render targets pools that allows easy sharing (mostly used on the render thread side)
| void FRenderTargetPool::DestructSnapshots | ( | ) |
Destruct all snapshots, this must be done after all outstanding async tasks are done.
It is important because they hold ref counted texture pointers etc
| bool FRenderTargetPool::FindFreeElement | ( | FRHICommandList & | RHICmdList, |
| const FPooledRenderTargetDesc & | Desc, | ||
| TRefCountPtr< IPooledRenderTarget > & | Out, | ||
| const TCHAR * | InDebugName, | ||
| ERenderTargetTransience | TransienceHint = ERenderTargetTransience::Transient, |
||
| bool | bDeferTextureAllocation = false |
||
| ) |
| DebugName | must not be 0, we only store the pointer |
| Out | is not the return argument to avoid double allocation because of wrong reference counting call from RenderThread only |
| void FRenderTargetPool::GetStats | ( | uint32 & | OutWholeCount, |
| uint32 & | OutWholePoolInKB, | ||
| uint32 & | OutUsedInKB | ||
| ) | const |
Only to get statistics on usage and free elements.
Normally only called in renderthread or if FlushRenderingCommands was called()
| IPooledRenderTarget * FRenderTargetPool::MakeSnapshot | ( | const TRefCountPtr< IPooledRenderTarget > & | In | ) |
Destruct all snapshots, this must be done after all outstanding async tasks are done.
It is important because they hold ref counted texture pointers etc
| void FRenderTargetPool::TickPoolElements | ( | ) |
Can release RT, should be called once per frame.
call from RenderThread only