From 7cb90782de87490cd6e550a0bfc6c9539931c36c Mon Sep 17 00:00:00 2001 From: REMqb Date: Wed, 30 Nov 2022 20:19:08 +0100 Subject: [PATCH] ~ fix post rebase & dirty fix avoid deleting shaders before linking them --- examples/Showcase/xmake.lua | 4 ++++ include/Nazara/OpenGLRenderer/Wrapper/Shader.inl | 2 +- xmake.lua | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/Showcase/xmake.lua b/examples/Showcase/xmake.lua index 4d78a517b..d6bf70e00 100644 --- a/examples/Showcase/xmake.lua +++ b/examples/Showcase/xmake.lua @@ -1,3 +1,7 @@ +if not has_config("assimp") then + return +end + target("Showcase") set_group("Examples") set_kind("binary") diff --git a/include/Nazara/OpenGLRenderer/Wrapper/Shader.inl b/include/Nazara/OpenGLRenderer/Wrapper/Shader.inl index d0bc828b7..07666ec12 100644 --- a/include/Nazara/OpenGLRenderer/Wrapper/Shader.inl +++ b/include/Nazara/OpenGLRenderer/Wrapper/Shader.inl @@ -102,7 +102,7 @@ namespace Nz::GL inline void Shader::DestroyHelper(OpenGLDevice& /*device*/, const Context& context, GLuint objectId) { - context.glDeleteShader(objectId); + // context.glDeleteShader(objectId); } } diff --git a/xmake.lua b/xmake.lua index b4d44416b..efecef871 100644 --- a/xmake.lua +++ b/xmake.lua @@ -200,7 +200,7 @@ if not is_plat("wasm") then add_requires("freetype", { configs = { bzip2 = true, png = true, woff2 = true, zlib = true, debug = is_mode("debug") } }) add_requires("libvorbis", { configs = { with_vorbisenc = false } }) add_requires("openal-soft", { configs = { shared = true }}) - add_requires("newtondynamics", { debug = is_plat("windows") and is_mode("debug") }) -- Newton doesn't like compiling in Debug on Linux + add_requires("newtondynamics3", { debug = is_plat("windows") and is_mode("debug") }) -- Newton doesn't like compiling in Debug on Linux end add_repositories("nazara-engine-repo https://github.com/NazaraEngine/xmake-repo") @@ -337,9 +337,9 @@ function ModuleTargetConfig(name, module) end end -function ModuleTarget(name, module) - target("Nazara" .. name) - set_kind("shared") +for name, module in pairs(modules) do + target("Nazara" .. name, function () + set_kind("$(kind)") set_group("Modules") add_rpathdirs("$ORIGIN")