Convert ODIN_OS and ODIN_ARCH to use enums rather than use strings

This commit is contained in:
gingerBill
2022-01-20 19:56:05 +00:00
parent cfbc1a447b
commit 3d7d347192
101 changed files with 341 additions and 310 deletions
+3 -3
View File
@@ -3,9 +3,9 @@ package glfw_bindings
import "core:c"
import vk "vendor:vulkan"
when ODIN_OS == "linux" { foreign import glfw "system:glfw" } // TODO: Add the billion-or-so static libs to link to in linux
when ODIN_OS == "darwin" { foreign import glfw "system:glfw" }
when ODIN_OS == "windows" {
when ODIN_OS == .Linux { foreign import glfw "system:glfw" } // TODO: Add the billion-or-so static libs to link to in linux
when ODIN_OS == .Darwin { foreign import glfw "system:glfw" }
when ODIN_OS == .Windows {
foreign import glfw {
"../lib/glfw3_mt.lib",
"system:user32.lib",
+3 -3
View File
@@ -1,6 +1,6 @@
package glfw
when ODIN_OS == "windows" {
when ODIN_OS == .Windows {
import win32 "core:sys/windows"
foreign import glfw { "lib/glfw3.lib", "system:user32.lib", "system:gdi32.lib", "system:shell32.lib" }
@@ -12,7 +12,7 @@ when ODIN_OS == "windows" {
GetWin32Window :: proc(window: WindowHandle) -> win32.HWND ---
GetWGLContext :: proc(window: WindowHandle) -> rawptr ---
}
} else when ODIN_OS == "linux" {
} else when ODIN_OS == .Linux {
// TODO: Native Linux
// Display* glfwGetX11Display(void);
// RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
@@ -24,7 +24,7 @@ when ODIN_OS == "windows" {
// struct wl_display* glfwGetWaylandDisplay(void);
// struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
// struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
} else when ODIN_OS == "darwin" {
} else when ODIN_OS == .Darwin {
// TODO: Native Darwin
// CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
// id glfwGetCocoaWindow(GLFWwindow* window);