SOURCE DUMP v1

This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit fb20299e9d

View file

@ -0,0 +1,32 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Brutal.Box2DApi;
/// <summary>
/// A 2D physics engine.
/// </summary>
public static partial class Box2D
{
private const string Dll =
#if DEBUG
"box2dd";
#else
"box2d";
#endif
static Box2D()
{
// Load the GLFW native library
var glfwNative = NativeLibrary.Load(Dll, typeof(Box2D).Assembly, DllImportSearchPath.AssemblyDirectory);
// Assign the native library to the assembly resolver
NativeLibrary.SetDllImportResolver(
typeof(Box2D).Assembly,
(libraryName, _, _) =>
{
return glfwNative;
}
);
}
}