Render extraction system & ECS/graphics refactor
Introduced RenderExtractionSystem for entity-based render data extraction. Added MeshInstance and MeshPalette components with shadow casting support. Refactored QueryBuilder API, SharedComponentStore, and component registration for clarity and flexibility. Updated SystemManager and SystemGroup to use SystemAPI. Replaced RenderingConfig with GraphicsEngineDesc/RenderSystemDesc. RenderFrame now uses CPU/GPU fence values for sync. Removed Camera.cs in favor of ECS-based rendering. Improved Material, RenderingLayerMask, Mesh, and RenderList APIs. Updated package references and fixed naming, error handling, and disposal issues.
This commit is contained in:
47
src/Runtime/Ghost.Engine/Components/MeshInstance.cs
Normal file
47
src/Runtime/Ghost.Engine/Components/MeshInstance.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using Ghost.Core;
|
||||
using Ghost.Entities;
|
||||
using Ghost.Graphics.Core;
|
||||
using Misaki.HighPerformance.LowLevel.Collections;
|
||||
|
||||
namespace Ghost.Engine.Components;
|
||||
|
||||
public struct MeshPalette : ISharedComponent, IEquatable<MeshPalette>
|
||||
{
|
||||
public UnsafeArray<Handle<Mesh>> meshes;
|
||||
public UnsafeArray<Handle<Material>> materials;
|
||||
|
||||
public bool Equals(MeshPalette other)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
return obj is MeshPalette palette && Equals(palette);
|
||||
}
|
||||
|
||||
public static bool operator ==(MeshPalette left, MeshPalette right)
|
||||
{
|
||||
return left.Equals(right);
|
||||
}
|
||||
|
||||
public static bool operator !=(MeshPalette left, MeshPalette right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
}
|
||||
|
||||
public struct MeshInstance : IComponent
|
||||
{
|
||||
public int meshIndex;
|
||||
public int materialIndex;
|
||||
public ShadowCastingMode shadowCastingMode;
|
||||
public RenderingLayerMask renderingLayerMask;
|
||||
public byte subMeshIndex;
|
||||
public bool staticShadowCaster;
|
||||
}
|
||||
Reference in New Issue
Block a user