Fixed bugs in rendering.

This commit is contained in:
2025-11-12 20:31:37 +09:00
parent 6cf2e35a9b
commit 708b8cd065
18 changed files with 102 additions and 90 deletions

View File

@@ -2,6 +2,7 @@ using Ghost.Graphics.Test.Windows;
using Microsoft.UI.Xaml;
using Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer;
using System.Runtime.InteropServices;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
@@ -23,12 +24,31 @@ public partial class UnitTestApp : Application
InitializeComponent();
}
private static void LoadDll()
{
var currentDir = AppContext.BaseDirectory;
var platform = OperatingSystem.IsWindows() ? "win" :
OperatingSystem.IsLinux() ? "linux" :
OperatingSystem.IsMacOS() ? "osx" : "unknown";
var arch = Environment.Is64BitProcess ? "x64" : "x86";
var nativeDllDir = Path.Combine(currentDir, "runtime", platform + "-" + arch, "native");
if (Directory.Exists(nativeDllDir))
{
foreach (var dll in Directory.EnumerateFiles(nativeDllDir, "*.dll"))
{
NativeLibrary.Load(dll);
}
}
}
/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
LoadDll();
Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI();
_window = new GraphicsTestWindow();