Add multi-threaded scene rendering with Job System

This commit is contained in:
Wojtek Figat
2022-11-06 15:35:43 +01:00
parent 183636289a
commit 9c7da16c1a
23 changed files with 564 additions and 160 deletions

View File

@@ -55,6 +55,14 @@ public:
return BoneMatrices != nullptr && BoneMatrices->IsAllocated();
}
/// <summary>
/// Determines whether this instance has been modified and needs to be flushed with GPU buffer.
/// </summary>
FORCE_INLINE bool IsDirty() const
{
return _isDirty;
}
/// <summary>
/// Setups the data container for the specified bones amount.
/// </summary>
@@ -75,8 +83,10 @@ public:
void OnDataChanged(bool dropHistory);
/// <summary>
/// Flushes the bones data buffer with the GPU by sending the data fro the CPU.
/// After bones Data has been send to the GPU buffer.
/// </summary>
/// <param name="context">The GPU context.</param>
void Flush(class GPUContext* context);
void OnFlush()
{
_isDirty = false;
}
};