From 562901aedf5a66c9d0664f223818617fa639a718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Wed, 2 Mar 2022 19:21:22 +0000 Subject: [PATCH] split all_vendor.odin create 3 files: - all_vendor.odin : no specific OS - all_vendor_directx.odin : directx vendor, windows-only - all_vendor_stb.odin : stb vendor, windows and linux only stb could technically be used on others OS. but it is shipped upstream as set of c-files without unified library name. --- examples/all/all_vendor.odin | 23 +---------------------- examples/all/all_vendor_directx.odin | 10 ++++++++++ examples/all/all_vendor_stl.odin | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 examples/all/all_vendor_directx.odin create mode 100644 examples/all/all_vendor_stl.odin diff --git a/examples/all/all_vendor.odin b/examples/all/all_vendor.odin index 9aa109e5b..f83e906a2 100644 --- a/examples/all/all_vendor.odin +++ b/examples/all/all_vendor.odin @@ -1,4 +1,3 @@ -//+build windows package all import botan "vendor:botan" @@ -16,24 +15,12 @@ import IMG "vendor:sdl2/image" import MIX "vendor:sdl2/mixer" import TTF "vendor:sdl2/ttf" -import stb_easy_font "vendor:stb/easy_font" -import stbi "vendor:stb/image" -import stbrp "vendor:stb/rect_pack" -import stbtt "vendor:stb/truetype" -import stb_vorbis "vendor:stb/vorbis" - import vk "vendor:vulkan" -import D3D11 "vendor:directx/d3d11" -import D3D12 "vendor:directx/d3d12" -import DXGI "vendor:directx/dxgi" - -// note these are technicaly darwin only but they are added to aid with documentation generation import NS "vendor:darwin/Foundation" import MTL "vendor:darwin/Metal" import CA "vendor:darwin/QuartzCore" - _ :: botan _ :: ENet _ :: gl @@ -47,15 +34,7 @@ _ :: SDLNet _ :: IMG _ :: MIX _ :: TTF -_ :: stb_easy_font -_ :: stbi -_ :: stbrp -_ :: stbtt -_ :: stb_vorbis _ :: vk -_ :: D3D11 -_ :: D3D12 -_ :: DXGI _ :: NS _ :: MTL -_ :: CA \ No newline at end of file +_ :: CA diff --git a/examples/all/all_vendor_directx.odin b/examples/all/all_vendor_directx.odin new file mode 100644 index 000000000..2f10d92f8 --- /dev/null +++ b/examples/all/all_vendor_directx.odin @@ -0,0 +1,10 @@ +//+build windows +package all + +import D3D11 "vendor:directx/d3d11" +import D3D12 "vendor:directx/d3d12" +import DXGI "vendor:directx/dxgi" + +_ :: D3D11 +_ :: D3D12 +_ :: DXGI diff --git a/examples/all/all_vendor_stl.odin b/examples/all/all_vendor_stl.odin new file mode 100644 index 000000000..9faf53c63 --- /dev/null +++ b/examples/all/all_vendor_stl.odin @@ -0,0 +1,15 @@ +//+build windows, linux +package all + +import stb_easy_font "vendor:stb/easy_font" +import stbi "vendor:stb/image" +import stbrp "vendor:stb/rect_pack" +import stbtt "vendor:stb/truetype" +import stb_vorbis "vendor:stb/vorbis" + +_ :: stb_easy_font +_ :: stbi +_ :: stbrp +_ :: stbtt +_ :: stb_vorbis +