Refactor graphics architecture and resource management
Added DescriptorAllocator.cs to manage descriptor allocations for Direct3D 12. Added Texture2D.cs to handle 2D textures and GPU resource creation. Added DescriptorAllocatorExample.cs to demonstrate the new descriptor allocator interface. Changed project files to reference Misaki.HighPerformance.LowLevel instead of Misaki.HighPerformance.Unsafe. Changed _renderView type from IRenderer? to Renderer? in ScenePage.xaml.cs. Changed EngineCore.cs to remove explicit graphics API specification during initialization. Changed Logger.cs to enhance the Assert method with a DoesNotReturnIf attribute. Changed resource types in Mesh.cs from IResource to GraphicsResource. Removed multiple interfaces including ICommandBuffer, IDebugLayer, IGraphicsDevice, IPipelineResource, IRenderPass, IRenderer, IResource, and IResourceAllocator to simplify the graphics architecture. Removed D3D12DebugLayer class from DebugLayer.cs to streamline the debug layer implementation. Updated CommandList.cs and D3D12CommandBuffer.cs to implement a new command list structure for Direct3D 12. Updated Material.cs to improve handling of constant buffers and textures. Updated Shader.cs to include new structures for texture and property information. Updated GraphicsPipeline.cs to support the new graphics device and resource management system. Updated UnitTestAppWindow.xaml.cs to reflect changes in the renderer type and ensure proper resource management. Updated BindlessMeshRenderPass.cs and MeshRenderPass.cs to implement modern rendering techniques, including bindless textures and improved shader management. Updated CBufferCache.cs to align with the new resource management system and improve memory handling.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Ghost.Engine.Models;
|
||||
using Ghost.Engine.Services;
|
||||
using Ghost.Graphics;
|
||||
using Ghost.Graphics.Data;
|
||||
|
||||
namespace Ghost.Engine;
|
||||
|
||||
@@ -11,7 +10,7 @@ internal class EngineCore
|
||||
{
|
||||
ActivationHandler.Handle(args);
|
||||
|
||||
GraphicsPipeline.Initialize(GraphicsAPI.D3D12);
|
||||
GraphicsPipeline.Initialize();
|
||||
GraphicsPipeline.Start();
|
||||
|
||||
Logger.LogInfo("Engine started successfully.");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Ghost.Engine.Models;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Ghost.Engine.Services;
|
||||
|
||||
@@ -89,7 +90,7 @@ public static class Logger
|
||||
LogExceptionInternal(ex);
|
||||
}
|
||||
|
||||
public static void Assert(bool condition, object? message = null)
|
||||
public static void Assert([DoesNotReturnIf(false)] bool condition, object? message = null)
|
||||
{
|
||||
if (!condition)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user