![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <RenderGraphBlackboard.h>
Public Member Functions | |
| template<typename StructType , typename... ArgsType> | |
| StructType & | Create (ArgsType &&... Args) |
| template<typename StructType > | |
| StructType * | GetMutable () const |
| template<typename StructType > | |
| const StructType * | Get () const |
| template<typename StructType , typename... ArgsType> | |
| StructType & | GetOrCreate (ArgsType &&... Args) |
| template<typename StructType > | |
| StructType & | GetMutableChecked () const |
| template<typename StructType > | |
| const StructType & | GetChecked () const |
Friends | |
| class | FRDGBuilder |
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<FMyStruct>();
//... }
static void UseStruct(const FRDGBlackboard& GraphBlackboard) { const auto& MyStruct = GraphBlackboard.GetChecked<FMyStruct>();
//... }
|
inline |
Creates a new instance of a struct. Asserts if one already existed.
|
inline |
Gets an immutable instance of the struct. Returns null if not present in the blackboard.
|
inline |
Gets an immutable instance of the struct. Asserts if not present in the blackboard.
|
inline |
Gets a mutable instance of the struct. Returns null if not present in the blackboard.
|
inline |
Gets a mutable instance of the struct. Asserts if not present in the blackboard.
|
inline |
|
friend |