Refactor render graph error handling and resource APIs
- RenderGraph.Compile/Execute now return Error for better failure detection; error handling is propagated throughout compiler and executor. - Renamed ScheduleReleaseResource to ReleaseResource for clarity; updated all usages. - ResourceManager now calls ReleaseResource directly on Mesh, Material, and Shader types. - Camera exposes Actual/Virtual size properties and Render returns Error. - RenderingContext now uses IResourceManager for mesh/resource ops. - Replaced custom BinaryWriter with BufferWriter in RenderGraphHasher. - Improved variable naming, interface signatures, and code formatting. - Added Error extension for IsSuccess/IsFailure. - Minor FMOD/native interop and test code cleanups. - No breaking API changes except for new Error return values on some methods.
This commit is contained in:
@@ -204,7 +204,7 @@ public abstract class SystemGroup : ISystem
|
||||
foreach (var sys in systems)
|
||||
{
|
||||
var type = sys.GetType();
|
||||
if (!dependencies.TryGetValue(type, out HashSet<Type>? value))
|
||||
if (!dependencies.TryGetValue(type, out var value))
|
||||
{
|
||||
value = [];
|
||||
dependencies[type] = value;
|
||||
@@ -234,7 +234,7 @@ public abstract class SystemGroup : ISystem
|
||||
// We loop until we have sorted everyone
|
||||
while (sortedList.Count < systems.Count)
|
||||
{
|
||||
bool addedAny = false;
|
||||
var addedAny = false;
|
||||
|
||||
foreach (var sys in systems)
|
||||
{
|
||||
@@ -242,7 +242,7 @@ public abstract class SystemGroup : ISystem
|
||||
if (visited.Contains(type)) continue;
|
||||
|
||||
// Check if all dependencies for this system are already visited/sorted
|
||||
bool canRun = true;
|
||||
var canRun = true;
|
||||
if (dependencies.TryGetValue(type, out var deps))
|
||||
{
|
||||
foreach (var dep in deps)
|
||||
|
||||
Reference in New Issue
Block a user