Navigation
API > API/Runtime > API/Runtime/RenderCore
The blackboard is a map of struct instances with a lifetime tied to a render graph allocator. It is designed to solve cases where explicit marshaling of immutable data is undesirable. Structures are created once and the mutable reference is returned.
Good candidates for the blackboard would be data that is created once and immutably fetched across the entire renderer pipeline, where marshaling would create more maintenance burden than benefit. More constrained data structures should be marshaled through function calls instead.
Example of Usage:
class FMyStruct { public: FRDGTextureRef TextureA = nullptr; FRDGTextureRef TextureB = nullptr; FRDGTextureRef TextureC = nullptr; };
RDG_REGISTER_BLACKBOARD_STRUCT(FMyStruct);
static void InitStruct(FRDGBlackboard& GraphBlackboard) { auto& MyStruct = GraphBlackboard.Create
//... }
static void UseStruct(const FRDGBlackboard& GraphBlackboard) { const auto& MyStruct = GraphBlackboard.GetChecked
//... }
| Name | FRDGBlackboard |
| Type | class |
| Header File | /Engine/Source/Runtime/RenderCore/Public/RenderGraphBlackboard.h |
| Include Path | #include "RenderGraphBlackboard.h" |
Syntax
class FRDGBlackboard
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FRDGBlackboard
(
FRDGAllocator& InAllocator |
RenderGraphBlackboard.h |
Structs
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Allocator | FRDGAllocator & | RenderGraphBlackboard.h | ||
| Blackboard | TArray< FStruct *, FRDGArrayAllocator > | RenderGraphBlackboard.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
StructType & Create
(
ArgsType&&... Args |
Creates a new instance of a struct. Asserts if one already existed. | RenderGraphBlackboard.h | |
const StructType * Get() |
Gets an immutable instance of the struct. Returns null if not present in the blackboard. | RenderGraphBlackboard.h | |
const StructType & GetChecked() |
Gets an immutable instance of the struct. Asserts if not present in the blackboard. | RenderGraphBlackboard.h | |
StructType * GetMutable() |
Gets a mutable instance of the struct. Returns null if not present in the blackboard. | RenderGraphBlackboard.h | |
StructType & GetMutableChecked() |
Gets a mutable instance of the struct. Asserts if not present in the blackboard. | RenderGraphBlackboard.h | |
StructType & GetOrCreate
(
ArgsType&&... Args |
RenderGraphBlackboard.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static uint32 AllocateIndex
(
FString&& TypeName |
RenderGraphBlackboard.h | ||
static uint32 GetStructIndex() |
RenderGraphBlackboard.h | ||
static FString GetTypeName () |
RenderGraphBlackboard.h | ||
static FString GetTypeName
(
const TCHAR* ClassName, |
RenderGraphBlackboard.h |