Navigation
API > API/Runtime > API/Runtime/RenderCore
A system for dynamically allocating GPU memory for rendering. Note that this must derive from FRenderResource so that we can safely free the shader resource views for OpenGL and other platforms. If we wait until the module is shutdown, the renderer RHI will have already been destroyed and we can execute code on invalid data. By making ourself a render resource, we clean up immediately before the renderer dies.
| Name | FGlobalDynamicReadBuffer |
| Type | class |
| Header File | /Engine/Source/Runtime/RenderCore/Public/DynamicBufferAllocator.h |
| Include Path | #include "DynamicBufferAllocator.h" |
Syntax
class FGlobalDynamicReadBuffer : public FRenderResource
Inheritance Hierarchy
- FRenderResource → FGlobalDynamicReadBuffer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGlobalDynamicReadBuffer() |
DynamicBufferAllocator.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FGlobalDynamicReadBuffer() |
DynamicBufferAllocator.h |
Structs
| Name | Remarks |
|---|---|
| FAllocation | Information regarding an allocation from this buffer. |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAllocation AllocateFloat
(
uint32 Num |
DynamicBufferAllocator.h | ||
FAllocation AllocateHalf
(
uint32 Num |
DynamicBufferAllocator.h | ||
FAllocation AllocateInt32
(
uint32 Num |
DynamicBufferAllocator.h | ||
FAllocation AllocateUInt32
(
uint32 Num |
DynamicBufferAllocator.h | ||
void Commit () |
DynamicBufferAllocator.h | ||
void Commit
(
FRHICommandListImmediate& RHICmdList |
Commits allocated memory to the GPU. | DynamicBufferAllocator.h | |
bool IsRenderAlarmLoggingEnabled() |
Returns true if log statements should be made because we exceeded GMaxVertexBytesAllocatedPerFrame | DynamicBufferAllocator.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAllocation AllocateInternal
(
FDynamicReadBufferPool* BufferPool, |
DynamicBufferAllocator.h | ||
void Cleanup() |
DynamicBufferAllocator.h | ||
void IncrementTotalAllocations
(
uint32 Num |
DynamicBufferAllocator.h |
Overridden from FRenderResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitRHI
(
FRHICommandListBase& RHICmdList |
Initializes the RHI resources used by this resource. | DynamicBufferAllocator.h | |
virtual void ReleaseRHI () |
Releases the RHI resources used by this resource. | DynamicBufferAllocator.h |