mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Convert ODIN_OS and ODIN_ARCH to use enums rather than use strings
This commit is contained in:
Vendored
+3
-3
@@ -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",
|
||||
|
||||
Vendored
+3
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user