Replace Magick.NET with stb_image; refactor asset pipeline
- Switched image loading/saving from Magick.NET to native stb_image (Ghost.StbI), removing Magick.NET dependency. - Added Ghost.StbI project with native DLL, P/Invoke bindings, and wrapper. - Refactored TextureAssetHandler and TextureProcessor for stb_image, memory-mapped IO, and HDR/16-bit support. - Split IAssetHandler into IImportableAssetHandler and IPackableAssetHandler; updated interfaces to use FileStream. - Added shader and mesh asset handlers (GraphicsShaderAssetHandler, ComputeShaderAssetHandler, FBXAssetHandler). - Improved asset registry/catalog path handling and naming consistency. - Updated asset import pipeline to use new interfaces and trigger engine reimport. - Enhanced UI toolbar button styles and EditPage layout. - Added StbIBindingTest, DisableRuntimeMarshalling, and native wrapper attributes. - Updated wrapper generator for regex derivesFrom; added stbi.json config. - Removed Magick.NET reference; added Ghost.StbI and Ghost.Ufbx references. - Miscellaneous bugfixes and code cleanup.
This commit is contained in:
@@ -197,7 +197,7 @@ internal unsafe partial class AssetEntry
|
||||
|
||||
if (Interlocked.CompareExchange(ref _pendingReimport, false, true))
|
||||
{
|
||||
_assetManager.InvalidateAsset(_assetId); // re-queue
|
||||
_assetManager.ReimportAsset(_assetId); // re-queue
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ internal partial class AssetManager : IDisposable
|
||||
return entry;
|
||||
}
|
||||
|
||||
public void InvalidateAsset(Guid guid)
|
||||
public void ReimportAsset(Guid guid)
|
||||
{
|
||||
if (!_entries.TryGetValue(guid, out var entry))
|
||||
{
|
||||
|
||||
@@ -4,6 +4,12 @@ using Misaki.HighPerformance.Jobs;
|
||||
|
||||
namespace Ghost.Engine;
|
||||
|
||||
public interface IRuntimeInitializeCallback
|
||||
{
|
||||
void Initialize();
|
||||
void Shutdown();
|
||||
}
|
||||
|
||||
public sealed partial class EngineCore : IDisposable
|
||||
{
|
||||
private readonly IContentProvider _contentProvider;
|
||||
@@ -13,6 +19,10 @@ public sealed partial class EngineCore : IDisposable
|
||||
private readonly RenderSystem _renderSystem;
|
||||
private readonly AssetManager _assetManager;
|
||||
|
||||
internal JobScheduler JobScheduler => _jobScheduler;
|
||||
internal RenderSystem RenderSystem => _renderSystem;
|
||||
internal AssetManager AssetManager => _assetManager;
|
||||
|
||||
public EngineCore(IContentProvider contentProvider)
|
||||
{
|
||||
_contentProvider = contentProvider;
|
||||
|
||||
13
src/Runtime/Ghost.Engine/TestSetup.cs
Normal file
13
src/Runtime/Ghost.Engine/TestSetup.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Ghost.Engine;
|
||||
|
||||
internal class TestSetup : IDisposable
|
||||
{
|
||||
public void Dispose()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user