aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2026-01-19 18:01:03 +0100
committerAndre Weissflog <floooh@gmail.com>2026-01-19 18:01:03 +0100
commitac09e0acff84b9c0714a4196f247422a80194596 (patch)
treee01a01c6590e597d7f47befb5b12f4e4f89c584f
parent5ad340c71c70d55c91eb8bcb9ed70ad18c635ee9 (diff)
sokol_gfx/app.h: update vulkan backend build instructions
-rw-r--r--sokol_app.h5
-rw-r--r--sokol_gfx.h19
2 files changed, 21 insertions, 3 deletions
diff --git a/sokol_app.h b/sokol_app.h
index d46ec9df..5082d23c 100644
--- a/sokol_app.h
+++ b/sokol_app.h
@@ -100,6 +100,11 @@
On Linux, you also need to use the -pthread compiler and linker option, otherwise weird
things will happen, see here for details: https://github.com/floooh/sokol/issues/376
+ For Linux+Vulkan install the following packages (or equivalents):
+ - libvulkan-dev
+ - vulkan-validationlayers
+ - vulkan-tools
+
On macOS and iOS, the implementation must be compiled as Objective-C.
On Emscripten:
diff --git a/sokol_gfx.h b/sokol_gfx.h
index f1e8e285..1bb40043 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -72,12 +72,25 @@
- on Linux with GLX: GL
- on Linux with Vulkan: vulkan
- on Android: GLESv3, log, android
- - on Windows with the MSVC or Clang toolchains: no action needed, libs are defined in-source via pragma-comment-lib
- - on Windows with MINGW/MSYS2 gcc: compile with '-mwin32' so that _WIN32 is defined
- - with the D3D11 backend: -ld3d11
+ - on Windows:
+ - with Vulkan: link with vulkan-1 (this is explicit in case you want to
+ use your own Vulkan loader library)
+ - with D3D11:
+ - on MSVC or Clang: no action needed, libs are defined in-source via pragma-comment-lib
+ - on MINGW/MSYS2 gcc: compile with '-mwin32' so that _WIN32 is defined and link with -ld3d11
+ - with GL: no linking needed since sokol_gfx.h comes with its own GL loader on Windows
On macOS and iOS, the implementation must be compiled as Objective-C.
+ For Linux+Vulkan install the following packages (or equivalents):
+ - libvulkan-dev
+ - vulkan-validationlayers
+ - vulkan-tools
+
+ For Windows+Vulkan install the Vulkan SDK and in your build system:
+ - add a header search path to $ENV{VULKAN_SDK}/Include
+ - add a link search path to $ENV{VULKAN_SDK}/Env
+
On Emscripten:
- for WebGL2: add the linker option `-s USE_WEBGL2=1`
- for WebGPU: compile and link with `--use-port=emdawnwebgpu`