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:
2026-04-24 00:40:27 +09:00
parent 3533d3367f
commit 4757c0c91a
52 changed files with 8343 additions and 270 deletions

View File

@@ -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))
{

View File

@@ -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;

View 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();
}
}