diff options
| author | Sébastien Marie <semarie@online.fr> | 2022-03-02 18:44:29 +0000 |
|---|---|---|
| committer | Sébastien Marie <semarie@online.fr> | 2022-03-02 18:44:29 +0000 |
| commit | 5b783d637674e6be8724dd0c458777e5162b1ff5 (patch) | |
| tree | 0f78440def469506b428d740d8b78b7e7599dfed | |
| parent | d3f3528d1d545c581c368d5d0810c2b5cf061479 (diff) | |
vendor: raylib: simplify foreign import
| -rw-r--r-- | vendor/raylib/raylib.odin | 8 | ||||
| -rw-r--r-- | vendor/raylib/rlgl.odin | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin index 0c8248683..e7c6532ef 100644 --- a/vendor/raylib/raylib.odin +++ b/vendor/raylib/raylib.odin @@ -99,15 +99,17 @@ when ODIN_OS == .Windows { "system:User32.lib", "system:Shell32.lib", } -} -when ODIN_OS == .Linux { +} else when ODIN_OS == .Linux { foreign import lib { "linux/libraylib.a", "system:dl", "system:pthread", } +} else when ODIN_OS == .Darwin { + foreign import lib "macos/libraylib.a" +} else { + foreign import lib "system:raylib" } -when ODIN_OS == .Darwin { foreign import lib "macos/libraylib.a" } VERSION :: "4.0" diff --git a/vendor/raylib/rlgl.odin b/vendor/raylib/rlgl.odin index 936a34765..7e7f2feea 100644 --- a/vendor/raylib/rlgl.odin +++ b/vendor/raylib/rlgl.odin @@ -10,9 +10,13 @@ when ODIN_OS == .Windows { "system:User32.lib", "system:Shell32.lib", } +} else when ODIN_OS == .Linux { + foreign import lib "linux/libraylib.a" +} else when ODIN_OS == .Darwin { + foreign import lib "macos/libraylib.a" +} else { + foreign import lib "system:raylib" } -when ODIN_OS == .Linux { foreign import lib "linux/libraylib.a" } -when ODIN_OS == .Darwin { foreign import lib "macos/libraylib.a" } GRAPHICS_API_OPENGL_11 :: false GRAPHICS_API_OPENGL_21 :: true @@ -378,4 +382,4 @@ foreign lib { // Quick and dirty cube/quad buffers load->draw->unload rlLoadDrawCube :: proc() --- // Load and draw a cube rlLoadDrawQuad :: proc() --- // Load and draw a quad -}
\ No newline at end of file +} |