Add support for reflection-free mode

このコミットが含まれているのは:
Andrii Kurdiumov authored and Sergio Pedri committed 2022-11-07 23:06:36 +01:00
1 親 820cd39abf
コミット 76a08ae06f
3ファイル変更
+16 -4

検索条件に一致するファイルはありません

+14 -2
ファイルの表示
@@ -45,12 +45,24 @@ internal static unsafe class Win32ApplicationRunner
/// <param name="application">The input application instance to run.</param>
/// <returns>The exit code for the application.</returns>
public static int Run(Win32Application application)
{
return Run(application, Assembly.GetExecutingAssembly().FullName ?? "ComputeSharp");
}
/// <summary>
/// Runs a specified application and starts the main loop to update its state. This is the entry point for a given application,
/// and it should be called as soon as the process is launched, excluding any other additional initialization needed.
/// </summary>
/// <param name="application">The input application instance to run.</param>
/// <param name="applicatioName">Name of the input application instance to run.</param>
/// <returns>The exit code for the application.</returns>
public static int Run(Win32Application application, string applicatioName)
{
Win32ApplicationRunner.application = application;
HMODULE hInstance = Windows.GetModuleHandleW(null);
fixed (char* name = Assembly.GetExecutingAssembly().FullName)
fixed (char* name = applicatioName)
fixed (char* windowTitle = application.GetType().ToString())
{
// Initialize the window class
@@ -162,7 +174,7 @@ internal static unsafe class Win32ApplicationRunner
}
/// <summary>
/// Processes incoming messages for a window.
/// Processes incoming messages for a window.
/// </summary>
/// <param name="hwnd">A handle to the window.</param>
/// <param name="uMsg">The message.</param>
+1 -1
ファイルの表示
@@ -61,7 +61,7 @@ class Program
Console.WriteLine();
Console.WriteLine($"Starting {Samples[index].ShaderName}...");
_ = Win32ApplicationRunner.Run(Samples[index].Application);
_ = Win32ApplicationRunner.Run(Samples[index].Application, "ComputeSharp.SwapChain");
}
}
while (index >= 0 && index < Samples.Length);
+1 -1
ファイルの表示
@@ -41,7 +41,7 @@
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Condition="'$(TargetFramework)' == 'netstandard2.0'" Project="..\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
<!-- Shared project with TerraFX.Interop.Windows fork -->
<Import Condition="'$(TargetFramework)' == 'netstandard2.0'" Project="..\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems" Label="Shared" />