diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c87bd93..14ac879c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,9 @@ jobs: compiler: dmd-latest runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@main - uses: egor-tensin/vs-shell@v2 + if: runner.os == 'Windows' with: arch: x64 - uses: dlang-community/setup-dlang@v2 @@ -69,7 +70,7 @@ jobs: runs-on: [ubuntu-24.04-arm, ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@main - uses: dlang-community/setup-dlang@v2 with: compiler: ldc-master @@ -105,7 +106,7 @@ jobs: runs-on: [ubuntu-24.04-arm, ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@main - uses: dlang-community/setup-dlang@v2 with: compiler: ldc-master @@ -144,7 +145,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@main - name: prepare-linux run: | pacman -Syu --noconfirm @@ -171,3 +172,56 @@ jobs: dub build :texcube dub build :userdata dub build :vertexpull + + build-vulkan: + strategy: + fail-fast: false + matrix: + runs-on: [ubuntu-24.04-arm, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.runs-on }} + steps: + - uses: actions/checkout@main + - uses: egor-tensin/vs-shell@v2 + if: runner.os == 'Windows' + with: + arch: x64 + - uses: humbletim/setup-vulkan-sdk@main + if: runner.os == 'Windows' + with: + vulkan-query-version: 1.4.335.0 + vulkan-components: Vulkan-Headers, Vulkan-Loader + vulkan-use-cache: true + - uses: dlang-community/setup-dlang@v2 + with: + compiler: ldc-master + - name: prepare-linux + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install libgl1-mesa-dev libegl1-mesa-dev mesa-common-dev xorg-dev libasound-dev libvulkan-dev + - name: (dub) Running shdc + run: dub build -c genshaders-vk + - name: (dub) Build sokol examples + working-directory: examples + run: | + dub build :blend -c vulkan + dub build :bufferoffsets -c vulkan + dub build :clear -c vulkan + dub build :cube -c vulkan + dub build :debugtext -c vulkan + dub build :droptest -c vulkan + dub build :imgui -c vulkan + dub build :instancing -c vulkan + dub build :instancingcompute -c vulkan + dub build :mrt -c vulkan + dub build :noninterleaved -c vulkan + dub build :nuklear -c vulkan + dub build :offscreen -c vulkan + dub build :quad -c vulkan + dub build :shapes -c vulkan + dub build :saudio -c vulkan + dub build :sglcontext -c vulkan + dub build :sglpoints -c vulkan + dub build :triangle -c vulkan + dub build :texcube -c vulkan + dub build :vertexpull -c vulkan diff --git a/README.md b/README.md index 34cbaa6a..0bf6573c 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ dub :triangle By default, the backend 3D API will be selected based on the target platform: - macOS: Metal -- Windows: D3D11 -- Linux: GL/Wayland +- Windows: D3D11/Vulkan +- Linux: GL/Wayland/Vulkan - Wasm (LDC2 required) - WebGL2/WebGPU support #### Usage - template project @@ -52,6 +52,7 @@ dub init -t sokol-d - imgui - instancing - instancingcompute +- nuklear - saudio - sglcontext - sglpoints @@ -68,17 +69,21 @@ Available configurations: sokol-shared # Shared/dynamic library build sokol-wayland-static # Wayland static build for Linux sokol-wayland-shared # Wayland shared build for Linux + sokol-vulkan # Sokol + Vulkan Static library build imgui-static # Sokol + Dear ImGui static build imgui-shared # Sokol + Dear ImGui shared build + imgui-vulkan # Sokol + Dear ImGui + Vulkan static build imgui-wgles3 # Sokol + Dear ImGui WebGL ES3 build imgui-wgpu # Sokol + Dear ImGui WebGPU build sokol-wgles3 # WebGL ES3 build sokol-wgpu # WebGPU build nuklear-static # Sokol + Nuklear static build nuklear-shared # Sokol + Nuklear shared build + nuklear-vulkan # Sokol + Nuklear + Vulkan static build nuklear-wgles3 # Sokol + Nuklear WebGL ES3 build nuklear-wgpu # Sokol + Nuklear WebGPU build genshaders # [re]Generate shader code + genshaders-vk # [re]Generate vk-shader code ``` ## Additional Build Options diff --git a/build.d b/build.d index 866a9b3a..703b4657 100644 --- a/build.d +++ b/build.d @@ -133,7 +133,7 @@ void main(string[] args) @safe // Execute build steps if (opts.downloadShdc) - buildShaders(vendorPath); + buildShaders(vendorPath, opts.backend); else if (opts.linkExample) { EmLinkOptions linkOpts = { @@ -218,7 +218,7 @@ void getNuklear(string vendor) @safe } } -void buildShaders(string vendor) @safe +void buildShaders(string vendor, ref SokolBackend opts) @safe { immutable shdcPath = getSHDC(vendor); immutable shadersDir = "examples/shaders"; @@ -233,7 +233,7 @@ void buildShaders(string vendor) @safe else enum glsl = "glsl430"; - immutable slangTemplate = glsl ~ ":metal_macos:hlsl5:%s:wgsl"; + immutable slangTemplate = opts == SokolBackend.vulkan ? glsl ~ ":metal_macos:hlsl5:%s:wgsl:spirv_vk" : glsl ~ ":metal_macos:hlsl5:%s:wgsl"; version (Posix) executeOrFail(["chmod", "+x", shdcPath], "Failed to set shader permissions", true); @@ -278,7 +278,8 @@ enum SokolBackend metal, glcore, gles3, - wgpu + wgpu, + vulkan } struct LibSokolOptions @@ -347,7 +348,8 @@ void buildLibSokol(LibSokolOptions opts) @safe lflags ~= opts.use_wayland ? [ "-lwayland-client", "-lwayland-egl", "-lwayland-cursor", "-lxkbcommon" ] : []; - lflags ~= ["-lX11", "-lGL", "-lXi", "-lXcursor", "-lasound"]; + lflags ~= opts.backend == SokolBackend.vulkan ? ["-lvulkan"] : ["-lGL"]; + lflags ~= ["-lX11", "-lXi", "-lXcursor", "-lasound"]; break; case "windows": cflags ~= ["/DNDEBUG", "/DIMPL", "/wd4190", "/O2"]; diff --git a/dub.json b/dub.json index 23a7eeb7..4eb08fc9 100644 --- a/dub.json +++ b/dub.json @@ -2,7 +2,7 @@ "name": "sokol-d", "description": "D bindings for sokol", "license": "Zlib", - "version": "0.4.1", + "version": "0.4.2", "authors": [ "Matheus França", "Andre Weissflog" @@ -398,6 +398,88 @@ "rm $PACKAGE_DIR/build/*.o" ] }, + { + "name": "sokol-vulkan", + "excludedSourceFiles": [ + "src/sokol/*imgui.d", + "src/sokol/nuklear.d", + "src/emscripten/*.d", + "src/imgui/*.d", + "src/imgui/*.c", + "src/nuklear/*.d", + "src/nuklear/*.c" + ], + "dflags-dmd": [ + "-i=sokol", + "-i=shaders", + "-i=handmade", + "-i=nuklear" + ], + "dflags-ldc": [ + "-i=sokol", + "-i=shaders", + "-i=handmade", + "-mcpu=native" + ], + "targetName": "sokold", + "targetPath": "build", + "environments-windows": { + "ENVIRONMENTS": "root.environments", + "VULKAN_SDK": "${VULKAN_SDK}" + }, + "libs": [ + "sokol" + ], + "libs-linux": [ + "X11", + "vulkan", + "Xi", + "Xcursor", + "asound", + "m", + "dl" + ], + "lflags-windows": [ + "/LIBPATH:$VULKAN_SDK\\Lib" + ], + "libs-windows": [ + "vulkan-1" + ], + "preBuildCommands-linux": [ + "mkdir -p $PACKAGE_DIR/build", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_log.o $PACKAGE_DIR/src/sokol/c/sokol_log.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_app.o $PACKAGE_DIR/src/sokol/c/sokol_app.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_args.o $PACKAGE_DIR/src/sokol/c/sokol_args.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_gfx.o $PACKAGE_DIR/src/sokol/c/sokol_gfx.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_time.o $PACKAGE_DIR/src/sokol/c/sokol_time.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_audio.o $PACKAGE_DIR/src/sokol/c/sokol_audio.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_gl.o $PACKAGE_DIR/src/sokol/c/sokol_gl.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_debugtext.o $PACKAGE_DIR/src/sokol/c/sokol_debugtext.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_shape.o $PACKAGE_DIR/src/sokol/c/sokol_shape.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_glue.o $PACKAGE_DIR/src/sokol/c/sokol_glue.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_fetch.o $PACKAGE_DIR/src/sokol/c/sokol_fetch.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -O2 -fPIE -c -o $PACKAGE_DIR/build/sokol_memtrack.o $PACKAGE_DIR/src/sokol/c/sokol_memtrack.c", + "ar rcs $PACKAGE_DIR/build/libsokol.a $PACKAGE_DIR/build/*.o", + "rm $PACKAGE_DIR/build/*.o" + ], + "preBuildCommands-windows": [ + "powershell -Command \"mkdir -Force $PACKAGE_DIR\\build\"", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_log.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_log.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_app.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_app.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_args.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_args.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_gfx.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_gfx.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_time.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_time.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_audio.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_audio.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_gl.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_gl.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_debugtext.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_debugtext.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_shape.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_shape.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_glue.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_glue.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_fetch.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_fetch.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /I\"$VULKAN_SDK\\Include\" /nologo /wd4190 /O2 /c /Fo$PACKAGE_DIR\\build\\sokol_memtrack.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_memtrack.c", + "lib.exe /nologo /OUT:$PACKAGE_DIR\\build\\sokol.lib $PACKAGE_DIR\\build\\*.obj", + "powershell -Command Remove-Item $PACKAGE_DIR\\build\\*.obj" + ] + }, { "name": "imgui-static", "targetName": "cimguid", @@ -712,6 +794,118 @@ "powershell -Command Remove-Item $PACKAGE_DIR\\build\\*.obj" ] }, + { + "name": "imgui-vulkan", + "targetName": "cimguid", + "targetPath": "build", + "excludedSourceFiles": [ + "src/sokol/nuklear.d", + "src/emscripten/*.d", + "src/nuklear/*.d", + "src/nuklear/*.c" + ], + "dflags-dmd": [ + "-i=sokol", + "-i=shaders", + "-i=handmade", + "-i=imgui", + "-P-I$PACKAGE_DIR/vendor/imgui/src" + ], + "dflags-gdc": [ + "-I$PACKAGE_DIR/vendor/imgui/src" + ], + "dflags-ldc": [ + "-i=sokol", + "-i=shaders", + "-i=handmade", + "-i=imgui", + "-P-I$PACKAGE_DIR/vendor/imgui/src", + "-mcpu=native" + ], + "environments-windows": { + "ENVIRONMENTS": "root.environments", + "VULKAN_SDK": "${VULKAN_SDK}" + }, + "libs": [ + "sokol", + "cimgui" + ], + "libs-linux": [ + "stdc++", + "X11", + "vulkan", + "Xi", + "Xcursor", + "asound", + "m", + "dl" + ], + "lflags-windows": [ + "/LIBPATH:$VULKAN_SDK\\Lib" + ], + "libs-windows": [ + "imm32", + "vulkan-1" + ], + "preBuildCommands-linux": [ + "mkdir -p $PACKAGE_DIR/build", + "$DC -run $PACKAGE_DIR/build.d --with-sokol-imgui --backend=vulkan", + "g++ -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -c -o $PACKAGE_DIR/build/imgui.o $PACKAGE_DIR/vendor/imgui/src/imgui.cpp", + "g++ -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -c -o $PACKAGE_DIR/build/imgui_demo.o $PACKAGE_DIR/vendor/imgui/src/imgui_demo.cpp", + "g++ -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -c -o $PACKAGE_DIR/build/imgui_draw.o $PACKAGE_DIR/vendor/imgui/src/imgui_draw.cpp", + "g++ -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -c -o $PACKAGE_DIR/build/imgui_tables.o $PACKAGE_DIR/vendor/imgui/src/imgui_tables.cpp", + "g++ -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -c -o $PACKAGE_DIR/build/imgui_widgets.o $PACKAGE_DIR/vendor/imgui/src/imgui_widgets.cpp", + "g++ -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -c -o $PACKAGE_DIR/build/cimgui.o $PACKAGE_DIR/vendor/imgui/src/cimgui.cpp", + "g++ -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -c -o $PACKAGE_DIR/build/cimgui_internal.o $PACKAGE_DIR/vendor/imgui/src/cimgui_internal.cpp", + "ar rcs $PACKAGE_DIR/build/libcimgui.a $PACKAGE_DIR/build/*.o", + "rm $PACKAGE_DIR/build/*.o", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_log.o $PACKAGE_DIR/src/sokol/c/sokol_log.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_app.o $PACKAGE_DIR/src/sokol/c/sokol_app.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_args.o $PACKAGE_DIR/src/sokol/c/sokol_args.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_time.o $PACKAGE_DIR/src/sokol/c/sokol_time.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_gfx.o $PACKAGE_DIR/src/sokol/c/sokol_gfx.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_audio.o $PACKAGE_DIR/src/sokol/c/sokol_audio.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_gl.o $PACKAGE_DIR/src/sokol/c/sokol_gl.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_debugtext.o $PACKAGE_DIR/src/sokol/c/sokol_debugtext.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_shape.o $PACKAGE_DIR/src/sokol/c/sokol_shape.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_glue.o $PACKAGE_DIR/src/sokol/c/sokol_glue.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_fetch.o $PACKAGE_DIR/src/sokol/c/sokol_fetch.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_imgui.o $PACKAGE_DIR/src/sokol/c/sokol_imgui.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_gfx_imgui.o $PACKAGE_DIR/src/sokol/c/sokol_gfx_imgui.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/imgui/src -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_memtrack.o $PACKAGE_DIR/src/sokol/c/sokol_memtrack.c", + "ar rcs $PACKAGE_DIR/build/libsokol.a $PACKAGE_DIR/build/*.o", + "rm $PACKAGE_DIR/build/*.o" + ], + "preBuildCommands-windows": [ + "powershell -Command \"mkdir -Force $PACKAGE_DIR\\build\"", + "$DC -run $PACKAGE_DIR/build.d --with-sokol-imgui --backend=vulkan", + "cl.exe /DNDEBUG /O2 /nologo /c /Fo$PACKAGE_DIR\\build\\imgui.obj $PACKAGE_DIR\\vendor\\imgui\\src\\imgui.cpp", + "cl.exe /DNDEBUG /O2 /nologo /c /Fo$PACKAGE_DIR\\build\\imgui_demo.obj $PACKAGE_DIR\\vendor\\imgui\\src\\imgui_demo.cpp", + "cl.exe /DNDEBUG /O2 /nologo /c /Fo$PACKAGE_DIR\\build\\imgui_draw.obj $PACKAGE_DIR\\vendor\\imgui\\src\\imgui_draw.cpp", + "cl.exe /DNDEBUG /O2 /nologo /c /Fo$PACKAGE_DIR\\build\\imgui_tables.obj $PACKAGE_DIR\\vendor\\imgui\\src\\imgui_tables.cpp", + "cl.exe /DNDEBUG /O2 /nologo /c /Fo$PACKAGE_DIR\\build\\imgui_widgets.obj $PACKAGE_DIR\\vendor\\imgui\\src\\imgui_widgets.cpp", + "cl.exe /DNDEBUG /O2 /nologo /c /Fo$PACKAGE_DIR\\build\\cimgui.obj $PACKAGE_DIR\\vendor\\imgui\\src\\cimgui.cpp", + "cl.exe /DNDEBUG /O2 /nologo /c /Fo$PACKAGE_DIR\\build\\cimgui_internal.obj $PACKAGE_DIR\\vendor\\imgui\\src\\cimgui_internal.cpp", + "lib.exe /nologo /OUT:$PACKAGE_DIR\\build\\cimgui.lib $PACKAGE_DIR\\build\\*.obj", + "powershell -Command \"Remove-Item $PACKAGE_DIR\\build\\*.obj\"", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_log.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_log.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_app.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_app.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_args.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_args.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_gfx.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_gfx.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_time.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_time.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_audio.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_audio.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_gl.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_gl.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_debugtext.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_debugtext.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_shape.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_shape.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_glue.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_glue.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_fetch.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_fetch.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_imgui.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_imgui.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_gfx_imgui.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_gfx_imgui.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\imgui\\src\" /Fo$PACKAGE_DIR\\build\\sokol_memtrack.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_memtrack.c", + "lib.exe /nologo /OUT:$PACKAGE_DIR\\build\\sokol.lib $PACKAGE_DIR\\build\\*.obj", + "powershell -Command Remove-Item $PACKAGE_DIR\\build\\*.obj" + ] + }, { "name": "imgui-wgles3", "libs": [ @@ -1081,6 +1275,102 @@ "powershell -Command Remove-Item $PACKAGE_DIR\\build\\*.obj" ] }, + { + "name": "nuklear-vulkan", + "targetName": "nuklear_d", + "targetPath": "build", + "excludedSourceFiles": [ + "src/sokol/*imgui.d", + "src/imgui/*.d", + "src/imgui/*.c" + ], + "dflags-dmd": [ + "-i=sokol", + "-i=shaders", + "-i=handmade", + "-i=nuklear", + "-P-I$PACKAGE_DIR/vendor/nuklear" + ], + "dflags-gdc": [ + "-I$PACKAGE_DIR/vendor/nuklear" + ], + "dflags-ldc": [ + "-i=sokol", + "-i=shaders", + "-i=handmade", + "-i=nuklear", + "-P-I$PACKAGE_DIR/vendor/nuklear", + "-mcpu=native" + ], + "environments-windows": { + "ENVIRONMENTS": "root.environments", + "VULKAN_SDK": "${VULKAN_SDK}" + }, + "lflags-windows": [ + "/LIBPATH:$VULKAN_SDK\\Lib" + ], + "libs": [ + "sokol", + "nuklear" + ], + "libs-linux": [ + "X11", + "vulkan", + "Xi", + "Xcursor", + "asound", + "m", + "dl" + ], + "libs-windows": [ + "imm32", + "vulkan-1" + ], + "preBuildCommands-linux": [ + "mkdir -p $PACKAGE_DIR/build", + "$DC -run $PACKAGE_DIR/build.d --with-sokol-nuklear", + "gcc -Wall -Wextra -Wno-unused-function -DNDEBUG -O2 -fPIE -I$PACKAGE_DIR/vendor/nuklear -c -o $PACKAGE_DIR/build/nuklear.o $PACKAGE_DIR/src/nuklear/c/nuklearc.c", + "ar rcs $PACKAGE_DIR/build/libnuklear.a $PACKAGE_DIR/build/*.o", + "rm $PACKAGE_DIR/build/*.o", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_log.o $PACKAGE_DIR/src/sokol/c/sokol_log.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_app.o $PACKAGE_DIR/src/sokol/c/sokol_app.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_args.o $PACKAGE_DIR/src/sokol/c/sokol_args.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_time.o $PACKAGE_DIR/src/sokol/c/sokol_time.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_gfx.o $PACKAGE_DIR/src/sokol/c/sokol_gfx.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_audio.o $PACKAGE_DIR/src/sokol/c/sokol_audio.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_gl.o $PACKAGE_DIR/src/sokol/c/sokol_gl.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_debugtext.o $PACKAGE_DIR/src/sokol/c/sokol_debugtext.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_shape.o $PACKAGE_DIR/src/sokol/c/sokol_shape.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_glue.o $PACKAGE_DIR/src/sokol/c/sokol_glue.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_fetch.o $PACKAGE_DIR/src/sokol/c/sokol_fetch.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_nuklear.o $PACKAGE_DIR/src/sokol/c/sokol_nuklear.c", + "gcc -DNDEBUG -DIMPL -DSOKOL_VULKAN -DSOKOL_DISABLE_WAYLAND -Wall -Wextra -Wno-unused-function -I$PACKAGE_DIR/vendor/nuklear -O2 -fPIC -c -o $PACKAGE_DIR/build/sokol_memtrack.o $PACKAGE_DIR/src/sokol/c/sokol_memtrack.c", + "ar rcs $PACKAGE_DIR/build/libsokol.a $PACKAGE_DIR/build/*.o", + "rm $PACKAGE_DIR/build/*.o" + ], + "preBuildCommands-windows": [ + "powershell -Command \"mkdir -Force $PACKAGE_DIR\\build\"", + "$DC -run $PACKAGE_DIR/build.d --with-sokol-nuklear", + "cl.exe /DNDEBUG /O2 /nologo /c /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\nuklear.obj $PACKAGE_DIR\\src\\nuklear\\c\\nuklearc.c", + "lib.exe /nologo /OUT:$PACKAGE_DIR\\build\\nuklear.lib $PACKAGE_DIR\\build\\*.obj", + "powershell -Command \"Remove-Item $PACKAGE_DIR\\build\\*.obj\"", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_log.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_log.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_app.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_app.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_args.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_args.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_gfx.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_gfx.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_time.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_time.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_audio.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_audio.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_gl.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_gl.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_debugtext.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_debugtext.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_shape.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_shape.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_glue.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_glue.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_fetch.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_fetch.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_nuklear.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_nuklear.c", + "cl.exe /DNDEBUG /DIMPL /DSOKOL_VULKAN /nologo /wd4190 /O2 /c /I\"$VULKAN_SDK\\Include\" /I\"$PACKAGE_DIR\\vendor\\nuklear\" /Fo$PACKAGE_DIR\\build\\sokol_memtrack.obj $PACKAGE_DIR\\src\\sokol\\c\\sokol_memtrack.c", + "lib.exe /nologo /OUT:$PACKAGE_DIR\\build\\sokol.lib $PACKAGE_DIR\\build\\*.obj", + "powershell -Command Remove-Item $PACKAGE_DIR\\build\\*.obj" + ] + }, { "name": "nuklear-wgles3", "libs": [ @@ -1155,9 +1445,26 @@ "postBuildCommands-windows": [ "powershell -Command Remove-Item $PACKAGE_DIR\\*.lib" ] + }, + { + "name": "genshaders-vk", + "excludedSourceFiles": [ + "src/sokol/*.d", + "src/imgui/*.d", + "src/nuklear/*.d" + ], + "preGenerateCommands": [ + "$DC -run $PACKAGE_DIR/build.d --download-sokol-tools --backend=vulkan" + ], + "postBuildCommands-posix": [ + "rm $PACKAGE_DIR/*.a" + ], + "postBuildCommands-windows": [ + "powershell -Command Remove-Item $PACKAGE_DIR\\*.lib" + ] } ], "subPackages": [ "init-exec" ] -} +} \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index 64d1da9f..9d178411 100644 --- a/examples/README.md +++ b/examples/README.md @@ -17,6 +17,7 @@ Available examples: - imgui - instancing - instancingcompute +- nuklear - saudio - sglcontext - sglpoints @@ -24,5 +25,5 @@ Available examples: Build command format: ```console -dub :[example] -c [native|wasm|wgpu] -b [debug|release|release-nobounds|release-betterc] +dub :[example] -c [native|vulkan|wasm|wgpu] -b [debug|release|release-nobounds|release-betterc] ``` diff --git a/examples/blend/dub.json b/examples/blend/dub.json index b6b08b18..11944bf2 100644 --- a/examples/blend/dub.json +++ b/examples/blend/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/bufferoffsets/dub.json b/examples/bufferoffsets/dub.json index da5136a3..5e2d85c3 100644 --- a/examples/bufferoffsets/dub.json +++ b/examples/bufferoffsets/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/clear/dub.json b/examples/clear/dub.json index 341a52de..728cc63a 100644 --- a/examples/clear/dub.json +++ b/examples/clear/dub.json @@ -50,6 +50,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/cube/dub.json b/examples/cube/dub.json index d20b3c6a..7d85a541 100644 --- a/examples/cube/dub.json +++ b/examples/cube/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/debugtext/dub.json b/examples/debugtext/dub.json index 2e929e08..efd97ac7 100644 --- a/examples/debugtext/dub.json +++ b/examples/debugtext/dub.json @@ -50,6 +50,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/droptest/dub.json b/examples/droptest/dub.json index 27c77a40..2bfd74db 100644 --- a/examples/droptest/dub.json +++ b/examples/droptest/dub.json @@ -50,6 +50,13 @@ "sokol-d": "imgui-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "imgui-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/imgui/dub.json b/examples/imgui/dub.json index a64861bf..19660182 100644 --- a/examples/imgui/dub.json +++ b/examples/imgui/dub.json @@ -50,6 +50,13 @@ "sokol-d": "imgui-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "imgui-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/instancing/dub.json b/examples/instancing/dub.json index 135103b5..d0e7e950 100644 --- a/examples/instancing/dub.json +++ b/examples/instancing/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/instancingcompute/dub.json b/examples/instancingcompute/dub.json index 01bf38af..21c550a8 100644 --- a/examples/instancingcompute/dub.json +++ b/examples/instancingcompute/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/mrt/dub.json b/examples/mrt/dub.json index 43ec746e..8a74ee17 100644 --- a/examples/mrt/dub.json +++ b/examples/mrt/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/noninterleaved/dub.json b/examples/noninterleaved/dub.json index aa355bcf..0d24b897 100644 --- a/examples/noninterleaved/dub.json +++ b/examples/noninterleaved/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/nuklear/dub.json b/examples/nuklear/dub.json index a1ad23fb..437f5cf0 100644 --- a/examples/nuklear/dub.json +++ b/examples/nuklear/dub.json @@ -15,7 +15,7 @@ "buildOptions": [ "debugMode", "debugInfo" - ] + ] }, "release": { "buildOptions": [ @@ -50,6 +50,13 @@ "sokol-d": "nuklear-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "nuklear-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/offscreen/dub.json b/examples/offscreen/dub.json index 335d91e9..607b8d25 100644 --- a/examples/offscreen/dub.json +++ b/examples/offscreen/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/quad/dub.json b/examples/quad/dub.json index a2115e22..db984f53 100644 --- a/examples/quad/dub.json +++ b/examples/quad/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/saudio/dub.json b/examples/saudio/dub.json index 8bf1e570..32c9d732 100644 --- a/examples/saudio/dub.json +++ b/examples/saudio/dub.json @@ -50,6 +50,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/sglcontext/dub.json b/examples/sglcontext/dub.json index c091375d..29bd43f9 100644 --- a/examples/sglcontext/dub.json +++ b/examples/sglcontext/dub.json @@ -50,6 +50,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/sglpoints/dub.json b/examples/sglpoints/dub.json index 631509ce..2d7eb4e1 100644 --- a/examples/sglpoints/dub.json +++ b/examples/sglpoints/dub.json @@ -50,6 +50,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/shapes/dub.json b/examples/shapes/dub.json index db6bc117..f190dab4 100644 --- a/examples/shapes/dub.json +++ b/examples/shapes/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/texcube/dub.json b/examples/texcube/dub.json index 943f2e0f..a63a2e0e 100644 --- a/examples/texcube/dub.json +++ b/examples/texcube/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/triangle/dub.json b/examples/triangle/dub.json index 26371c44..c25709f5 100644 --- a/examples/triangle/dub.json +++ b/examples/triangle/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/userdata/dub.json b/examples/userdata/dub.json index f8a184cb..58cadbff 100644 --- a/examples/userdata/dub.json +++ b/examples/userdata/dub.json @@ -50,6 +50,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary", diff --git a/examples/vertexpull/dub.json b/examples/vertexpull/dub.json index 473d791a..1d753b1e 100644 --- a/examples/vertexpull/dub.json +++ b/examples/vertexpull/dub.json @@ -53,6 +53,13 @@ "sokol-d": "sokol-static" } }, + { + "name": "vulkan", + "targetType": "executable", + "subConfigurations": { + "sokol-d": "sokol-vulkan" + } + }, { "name": "wasm", "targetType": "staticLibrary",