Navigation
API > API/Runtime > API/Runtime/RenderCore
References
| Module | RenderCore |
| Header | /Engine/Source/Runtime/RenderCore/Public/RenderGraphBlackboard.h |
| Include | #include "RenderGraphBlackboard.h" |
Syntax
class FRDGBlackboard
Remarks
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. Only the immutable version is accessible from the blackboard. This constraint on mutability is to discourage relying entirely on the blackboard. The mutable version should be marshaled around if needed. 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
//... }
Constructors
No constructors are accessible with public or protected access.
Functions
| Type | Name | Description | |
|---|---|---|---|
| StructType & | Create
(
ArgsType&&... Args |
Creates a new instance of a struct. Asserts if one already existed. | |
| const StructType * | Get () |
Gets an immutable instance of the struct. Returns null if not present in the blackboard. | |
| const StructType & | GetChecked () |
Gets an immutable instance of the struct. Asserts if not present in the blackboard. |