add bindings
This commit is contained in:
19745
src/Functions.bf
Normal file
19745
src/Functions.bf
Normal file
File diff suppressed because it is too large
Load Diff
26
src/Library.bf
Normal file
26
src/Library.bf
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using CxxBuildTool;
|
||||
|
||||
namespace VulkanMemoryAllocator;
|
||||
|
||||
static
|
||||
{
|
||||
[CLink, AlwaysInclude, Export]
|
||||
private static void __VMA_BF_FATAL_ERROR(char8* msg, char8* file, int32 line)
|
||||
{
|
||||
Runtime.FatalError(scope .(msg), scope .(file), line);
|
||||
}
|
||||
|
||||
[OnCompile(.TypeDone)]
|
||||
private static void Build()
|
||||
{
|
||||
if (!Compiler.IsBuilding) return;
|
||||
String flags = scope .(128);
|
||||
if (Environment.GetEnvironmentVariable("VULKAN_SDK", flags) case .Ok)
|
||||
{
|
||||
flags.Insert(0, "-I");
|
||||
flags.Append("/include");
|
||||
}
|
||||
CxxBuildTool.Ninja(Compiler.ProjectDir + "/src", Compiler.BuildDir + "/" + Compiler.ProjectName, "vk_mem_alloc", flags, "vk_mem_alloc.cpp");
|
||||
}
|
||||
}
|
||||
19739
src/VkMemAlloc.bf
Normal file
19739
src/VkMemAlloc.bf
Normal file
File diff suppressed because it is too large
Load Diff
9
src/vk_mem_alloc.cpp
Normal file
9
src/vk_mem_alloc.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
extern "C" void
|
||||
__VMA_BF_FATAL_ERROR(const char* message, const char* file, int line);
|
||||
#define VMA_ASSERT(expr) \
|
||||
if (!(expr)) \
|
||||
__VMA_BF_FATAL_ERROR("VMA Assert Failed: " #expr, __FILE__, __LINE__);
|
||||
|
||||
#define VMA_IMPLEMENTATION
|
||||
#define VK_NO_PROTOTYPES
|
||||
#include "vk_mem_alloc.h"
|
||||
19975
src/vk_mem_alloc.h
Normal file
19975
src/vk_mem_alloc.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user