Update rendering architecture and resource management
Added a new `Ref<T>` struct for reference semantics. Added the `RenderGraph` system for managing rendering passes. Added the `RenderTexture` class for encapsulating GPU resources. Added `GraphicsBuffer` class for effective GPU resource management. Changed `CommandList` methods from public to internal for visibility control. Changed `IRenderPass` interface from internal to public for accessibility. Changed `GetData<T>()` in `ComponentObject.cs` to return `CompRef<T>`. Changed `GetComponent<T>()` in `EntityManager.cs` to return `CompRef<T>`. Changed `GetSingleton<T>()` in `World.cs` to use `CompRef<T>`. Changed `IQueryTypeParameter` to use `CompRef<T>` for consistency. Changed `QueryItem<T0>` and related structs to use `CompRef<T>`. Changed `Material` class to support bindless textures. Changed `Shader` class to support bindless rendering. Changed `Mesh` class to support bindless vertex and index buffer access. Updated documentation to reflect the new bindless rendering architecture.
This commit is contained in:
@@ -20,16 +20,10 @@ var deconstructParams = Enumerable.Range(0, arity)
|
||||
.Select(i => {
|
||||
var name = $"c{i}";
|
||||
return arity == 1
|
||||
? $"out Ref<T0> {name}"
|
||||
: $"out Ref<T{i}> {name}";
|
||||
? $"out CompRef<T0> {name}"
|
||||
: $"out CompRef<T{i}> {name}";
|
||||
})
|
||||
.Aggregate((a, b) => a + ", " + b);
|
||||
var deconstructAssigns = Enumerable.Range(0, arity)
|
||||
.Select(i => {
|
||||
var name = $"c{i}";
|
||||
return $"{name} = new (ref _pool{i}.GetRef(_entity));";
|
||||
})
|
||||
.Aggregate((a, b) => a + b);
|
||||
#>
|
||||
public readonly struct QueryItem<<#= generics #>>
|
||||
<#= restrictions #>
|
||||
@@ -57,7 +51,10 @@ public readonly struct QueryItem<<#= generics #>>
|
||||
public void Deconstruct(out Entity entity, <#= deconstructParams #>)
|
||||
{
|
||||
entity = _entity;
|
||||
<#= deconstructAssigns #>
|
||||
|
||||
<# for (int i = 0; i < arity; i++){ #>
|
||||
c<#= i #> = new (ref _pool<#= i #>.GetRef(_entity));
|
||||
<# } #>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user