Skip to content

Commit

Permalink
fix: change default pl_config.h options
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Feb 13, 2025
1 parent 0ba144e commit 997b349
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions scripts/gen_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@

pl.add_source_files("../extensions/pl_unity_ext.c")
pl.set_output_binary("pl_unity_ext")
pl.add_definitions("PL_INCLUDE_SPIRV_CROSS")

# default config
with pl.configuration("debug"):
Expand Down
4 changes: 2 additions & 2 deletions src/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fi
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pl_unity_ext | debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PL_RESULT=${BOLD}${GREEN}Successful.${NC}
PL_DEFINES="-DPL_UNITY_BUILD -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -D_DEBUG -DPL_CONFIG_DEBUG "
PL_DEFINES="-DPL_UNITY_BUILD -DPL_INCLUDE_SPIRV_CROSS -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -D_DEBUG -DPL_CONFIG_DEBUG "
PL_INCLUDE_DIRECTORIES="-I../sandbox -I../src -I../libs -I../extensions -I../out -I../dependencies/stb -I../dependencies/cgltf -I$VULKAN_SDK/include -I/usr/include/vulkan "
PL_LINK_DIRECTORIES="-L../out -L/usr/lib/x86_64-linux-gnu -L$VULKAN_SDK/lib "
PL_COMPILER_FLAGS="-std=gnu11 -fPIC --debug -g "
Expand Down Expand Up @@ -247,7 +247,7 @@ fi
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pl_unity_ext | release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PL_RESULT=${BOLD}${GREEN}Successful.${NC}
PL_DEFINES="-DPL_UNITY_BUILD -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -DNDEBUG -DPL_CONFIG_RELEASE "
PL_DEFINES="-DPL_UNITY_BUILD -DPL_INCLUDE_SPIRV_CROSS -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -DNDEBUG -DPL_CONFIG_RELEASE "
PL_INCLUDE_DIRECTORIES="-I../sandbox -I../src -I../libs -I../extensions -I../out -I../dependencies/stb -I../dependencies/cgltf -I$VULKAN_SDK/include -I/usr/include/vulkan "
PL_LINK_DIRECTORIES="-L../out -L/usr/lib/x86_64-linux-gnu -L$VULKAN_SDK/lib "
PL_COMPILER_FLAGS="-std=gnu11 -fPIC "
Expand Down
6 changes: 3 additions & 3 deletions src/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fi
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pl_unity_ext | debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PL_RESULT=${BOLD}${GREEN}Successful.${NC}
PL_DEFINES="-DPL_UNITY_BUILD -DPL_METAL_BACKEND -DPL_UNITY_BUILD -D_DEBUG -DPL_CONFIG_DEBUG "
PL_DEFINES="-DPL_UNITY_BUILD -DPL_INCLUDE_SPIRV_CROSS -DPL_METAL_BACKEND -DPL_UNITY_BUILD -D_DEBUG -DPL_CONFIG_DEBUG "
PL_INCLUDE_DIRECTORIES="-I../sandbox -I../src -I../libs -I../extensions -I../out -I../dependencies/stb -I../dependencies/cgltf "
PL_LINK_DIRECTORIES="-L../out "
PL_COMPILER_FLAGS="-std=c99 -fmodules -ObjC -fPIC --debug -g -Wno-deprecated-declarations "
Expand Down Expand Up @@ -283,7 +283,7 @@ fi
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pl_unity_ext | release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PL_RESULT=${BOLD}${GREEN}Successful.${NC}
PL_DEFINES="-DPL_UNITY_BUILD -DPL_METAL_BACKEND -DPL_UNITY_BUILD -DNDEBUG -DPL_CONFIG_RELEASE "
PL_DEFINES="-DPL_UNITY_BUILD -DPL_INCLUDE_SPIRV_CROSS -DPL_METAL_BACKEND -DPL_UNITY_BUILD -DNDEBUG -DPL_CONFIG_RELEASE "
PL_INCLUDE_DIRECTORIES="-I../sandbox -I../src -I../libs -I../extensions -I../out -I../dependencies/stb -I../dependencies/cgltf "
PL_LINK_DIRECTORIES="-L../out "
PL_COMPILER_FLAGS="-std=c99 -fmodules -ObjC -fPIC -Wno-deprecated-declarations "
Expand Down Expand Up @@ -479,7 +479,7 @@ fi
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pl_unity_ext | vulkan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PL_RESULT=${BOLD}${GREEN}Successful.${NC}
PL_DEFINES="-DPL_UNITY_BUILD -DPL_VULKAN_BACKEND -D_DEBUG -DPL_CONFIG_DEBUG "
PL_DEFINES="-DPL_UNITY_BUILD -DPL_INCLUDE_SPIRV_CROSS -DPL_VULKAN_BACKEND -D_DEBUG -DPL_CONFIG_DEBUG "
PL_INCLUDE_DIRECTORIES="-I../sandbox -I../src -I../libs -I../extensions -I../out -I../dependencies/stb -I../dependencies/cgltf "
PL_LINK_DIRECTORIES="-L../out "
PL_COMPILER_FLAGS="-std=c99 -fmodules -ObjC -fPIC --debug -g "
Expand Down
4 changes: 2 additions & 2 deletions src/build_win32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pl_unity_ext | debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@set PL_DEFINES=-DPL_UNITY_BUILD -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -D_DEBUG -DPL_CONFIG_DEBUG
@set PL_DEFINES=-DPL_UNITY_BUILD -DPL_INCLUDE_SPIRV_CROSS -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -D_DEBUG -DPL_CONFIG_DEBUG
@set PL_INCLUDE_DIRECTORIES=-I"../sandbox" -I"../src" -I"../libs" -I"../extensions" -I"../out" -I"../dependencies/stb" -I"../dependencies/cgltf" -I"%WindowsSdkDir%Include\um" -I"%WindowsSdkDir%Include\shared" -I"%VULKAN_SDK%\Include"
@set PL_LINK_DIRECTORIES=-LIBPATH:"../out" -LIBPATH:"%VULKAN_SDK%\Lib"
@set PL_COMPILER_FLAGS=-Zc:preprocessor -nologo -std:c11 -W4 -WX -wd4201 -wd4100 -wd4996 -wd4505 -wd4189 -wd5105 -wd4115 -permissive- -Od -MDd -Zi
Expand Down Expand Up @@ -276,7 +276,7 @@ goto ExitLabel

::~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pl_unity_ext | release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@set PL_DEFINES=-DPL_UNITY_BUILD -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -DNDEBUG -DPL_CONFIG_RELEASE
@set PL_DEFINES=-DPL_UNITY_BUILD -DPL_INCLUDE_SPIRV_CROSS -DPL_VULKAN_BACKEND -DPL_UNITY_BUILD -DNDEBUG -DPL_CONFIG_RELEASE
@set PL_INCLUDE_DIRECTORIES=-I"../sandbox" -I"../src" -I"../libs" -I"../extensions" -I"../out" -I"../dependencies/stb" -I"../dependencies/cgltf" -I"%WindowsSdkDir%Include\um" -I"%WindowsSdkDir%Include\shared" -I"%VULKAN_SDK%\Include"
@set PL_LINK_DIRECTORIES=-LIBPATH:"../out" -LIBPATH:"%VULKAN_SDK%\Lib"
@set PL_COMPILER_FLAGS=-Zc:preprocessor -nologo -std:c11 -W4 -WX -wd4201 -wd4100 -wd4996 -wd4505 -wd4189 -wd5105 -wd4115 -permissive- -O2 -MD
Expand Down
2 changes: 1 addition & 1 deletion src/pl_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

// shaders
// #define PL_OFFLINE_SHADERS_ONLY
#define PL_INCLUDE_SPIRV_CROSS
// #define PL_INCLUDE_SPIRV_CROSS

// core extension options
#define PL_CORE_EXTENSION_INCLUDE_SHADER
Expand Down

0 comments on commit 997b349

Please sign in to comment.