migrate
This commit is contained in:
17
src/Glfw.bf
17
src/Glfw.bf
@@ -5,23 +5,6 @@ using System.Interop;
|
||||
|
||||
namespace Glfw;
|
||||
|
||||
static class Glfw
|
||||
{
|
||||
public struct Bool : c_int
|
||||
{
|
||||
public static operator Self(bool b) => b ? True : False;
|
||||
public static operator bool(Self b) => b != False;
|
||||
}
|
||||
|
||||
// Vulkan
|
||||
public typealias PFN_vkGetInstanceProcAddr = void*;
|
||||
public struct VkInstance : int;
|
||||
public struct VkPhysicalDevice : int;
|
||||
public typealias VkResult = c_int;
|
||||
public struct VkAllocationCallbacks;
|
||||
public struct VkSurfaceKHR : int;
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
/*************************************************************************
|
||||
|
||||
34
src/Library.bf
Normal file
34
src/Library.bf
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
using CxxBuildTool;
|
||||
|
||||
namespace Glfw;
|
||||
|
||||
static class Glfw
|
||||
{
|
||||
public struct Bool : c_int
|
||||
{
|
||||
public static operator Self(bool b) => b ? True : False;
|
||||
public static operator bool(Self b) => b != False;
|
||||
}
|
||||
|
||||
// Vulkan
|
||||
public typealias PFN_vkGetInstanceProcAddr = void*;
|
||||
public struct VkInstance : int;
|
||||
public struct VkPhysicalDevice : int;
|
||||
public typealias VkResult = c_int;
|
||||
public struct VkAllocationCallbacks;
|
||||
public struct VkSurfaceKHR : int;
|
||||
|
||||
[OnCompile(.TypeDone)]
|
||||
private static void Build()
|
||||
{
|
||||
if (!Compiler.IsBuilding) return;
|
||||
CxxBuildTool.CMake(
|
||||
Compiler.ProjectDir + "/glfw",
|
||||
Compiler.BuildDir + "/" + Compiler.ProjectName,
|
||||
"-DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_INSTALL=OFF"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user