diff options
-rw-r--r-- | draw/CMakeLists.txt | 10 | ||||
-rw-r--r-- | editor/CMakeLists.txt | 10 | ||||
-rw-r--r-- | editor/app.hpp | 2 | ||||
-rw-r--r-- | editor/draw.cpp | 1 | ||||
-rw-r--r-- | editor/imgui.cpp | 72 | ||||
-rw-r--r-- | external/CMakeLists.txt | 8 | ||||
m--------- | external/imgui | 0 | ||||
-rw-r--r-- | main/CMakeLists.txt | 10 | ||||
-rw-r--r-- | main/draw.cpp | 2 | ||||
-rw-r--r-- | serialize/CMakeLists.txt | 11 | ||||
-rw-r--r-- | shaders/lightmap.cpp | 76 | ||||
-rw-r--r-- | shaders/lightmap.hpp | 6 | ||||
-rw-r--r-- | shaders/lightmap.vert | 13 | ||||
-rw-r--r-- | src/CMakeLists.txt | 3 | ||||
-rw-r--r-- | test/CMakeLists.txt | 10 | ||||
-rw-r--r-- | userconfig-sthalik@Windows-Clang.cmake | 1 |
16 files changed, 135 insertions, 100 deletions
diff --git a/draw/CMakeLists.txt b/draw/CMakeLists.txt index f12604ab..f2e11490 100644 --- a/draw/CMakeLists.txt +++ b/draw/CMakeLists.txt @@ -3,8 +3,8 @@ file(GLOB sources "*.cpp" CONFIGURE_ARGS) add_library(${self} OBJECT "${sources}") target_link_libraries(${self} PUBLIC Magnum::GL) -if(NOT MSVC) - target_precompile_headers(${self} REUSE_FROM floormat) -else() - target_precompile_headers(${self} PRIVATE ../src/precomp.hpp) -endif() +#if(NOT MSVC) +# target_precompile_headers(${self} REUSE_FROM floormat) +#else() +# target_precompile_headers(${self} PRIVATE ../src/precomp.hpp) +#endif() diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index 372d9cd8..41173308 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -30,8 +30,8 @@ target_link_libraries(${self} PRIVATE ${self}_o floormat-main floormat-serialize install(TARGETS ${self} RUNTIME DESTINATION bin) -if(NOT MSVC) - target_precompile_headers(${self}_o REUSE_FROM floormat) -else() - target_precompile_headers(${self}_o PRIVATE ../src/precomp.hpp) -endif() +#if(NOT MSVC) +# target_precompile_headers(${self}_o REUSE_FROM floormat) +#else() +# target_precompile_headers(${self}_o PRIVATE ../src/precomp.hpp) +#endif() diff --git a/editor/app.hpp b/editor/app.hpp index e0168d68..d3eded11 100644 --- a/editor/app.hpp +++ b/editor/app.hpp @@ -115,6 +115,7 @@ private: void draw_clickables(); void draw_light_info(); void draw_lightmap_test(); + void do_lightmap_test(); void draw_editor_pane(float main_menu_height); void draw_inspector(); @@ -170,7 +171,6 @@ private: bool _render_clickables : 1 = false; bool _render_vobjs : 1 = true; bool _render_all_z_levels : 1 = true; - bool _testing_light : 1 = false; }; } // namespace floormat diff --git a/editor/draw.cpp b/editor/draw.cpp index aa8cc5f0..f54d6b49 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -182,6 +182,7 @@ void app::draw_collision_boxes() void app::draw() { + do_lightmap_test(); if (_render_bboxes) draw_collision_boxes(); if (_editor.current_tile_editor() || diff --git a/editor/imgui.cpp b/editor/imgui.cpp index ea76cc76..5bb0ad67 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -8,6 +8,7 @@ #include "main/clickable.hpp" #include "imgui-raii.hpp" #include "src/light.hpp" +#include <Magnum/GL/Renderer.h> namespace floormat { @@ -95,6 +96,8 @@ float app::draw_main_menu() void app::draw_ui() { + GL::Renderer::enable(GL::Renderer::Feature::ScissorTest); + const auto dpi = M->dpi_scale().min(); [[maybe_unused]] const auto style_ = style_saver{}; auto& style = ImGui::GetStyle(); @@ -114,8 +117,7 @@ void app::draw_ui() [[maybe_unused]] auto font = font_saver{ctx.FontSize*dpi}; - if (_tested_light) - draw_lightmap_test(); + draw_lightmap_test(); if (_editor.current_tile_editor() || _editor.current_scenery_editor() || _editor.current_vobj_editor()) draw_editor_pane(main_menu_height); @@ -127,6 +129,8 @@ void app::draw_ui() draw_z_level(); do_popup_menu(); ImGui::EndFrame(); + + GL::Renderer::disable(GL::Renderer::Feature::ScissorTest); } void app::draw_clickables() @@ -202,25 +206,22 @@ void app::draw_light_info() } } -void app::draw_lightmap_test() +void app::do_lightmap_test() { - fm_debug_assert(_tested_light != 0); + if (!_tested_light) + return; - constexpr auto preview_size = ImVec2{512, 512}; - ImGui::SetNextWindowSize(preview_size); + //GL::Renderer::setScissor({{}, M->window_size()}); // FIXME + GL::Renderer::disable(GL::Renderer::Feature::ScissorTest); auto& w = M->world(); auto e_ = w.find_entity(_tested_light); - auto b1 = push_style_var(ImGuiStyleVar_WindowPadding, {0, 0}); - - constexpr auto flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoScrollbar; - bool is_open = true; - - if (e_ && ImGui::Begin("Lightmap", &is_open, flags)) + if (e_) { + auto& e = *e_; fm_assert(e_->type() == entity_type::light); - const auto& li = static_cast<const light&>(*e_); + const auto& li = static_cast<const light&>(e); light_s L { .center = Vector2(li.coord.local()) * TILE_SIZE2 + Vector2(li.offset), .dist = li.max_distance, @@ -228,25 +229,36 @@ void app::draw_lightmap_test() .falloff = li.falloff, }; auto& shader = M->lightmap_shader(); - if (!_testing_light || true) - { - _testing_light = true; - shader.begin_occlusion(); - shader.add_chunk(Vector2{}, e_->chunk()); // todo add neighbors - shader.end_occlusion(); - shader.bind(); - shader.add_light(L); - M->bind(); - } - else - _testing_light = false; - //constexpr auto img_size = 1 / Vector2(lightmap_shader::max_chunks); - ImGui::Image(&shader.scratch_texture(), preview_size, {0, 0}, {1, 1}); + auto ch = Vector2(e.coord.chunk()); + shader.begin_occlusion(); + shader.add_chunk(ch, e.chunk()); // todo add neighbors + shader.end_occlusion(); + shader.bind(); + shader.add_light(ch, L); M->bind(); } - else - _testing_light = false; - ImGui::End(); +} + +void app::draw_lightmap_test() +{ + if (!_tested_light) + return; + + auto& shader = M->lightmap_shader(); + bool is_open = true; + constexpr auto preview_size = ImVec2{512, 512}; + + ImGui::SetNextWindowSize(preview_size); + + auto b1 = push_style_var(ImGuiStyleVar_WindowPadding, {0, 0}); + constexpr auto flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoScrollbar; + + //constexpr auto img_size = 1 / Vector2(lightmap_shader::max_chunks); + if (ImGui::Begin("Lightmap", &is_open, flags)) + { + ImGui::Image(&shader.scratch_texture(), preview_size, {0, 0}, {1, 1}); + ImGui::End(); + } if (!is_open) _tested_light = 0; } diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 024c2c4e..d4927955 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -117,14 +117,14 @@ if(FLOORMAT_SUBMODULE-DEPENDENCIES) MAGNUM_WITH_SHADERS ON MAGNUM_WITH_SHADERTOOLS ON - MAGNUM_WITH_ANYIMAGECONVERTER OFF + MAGNUM_WITH_ANYIMAGECONVERTER ON MAGNUM_WITH_ANYSCENECONVERTER OFF MAGNUM_WITH_ANYSHADERCONVERTER OFF MAGNUM_WITH_BASISIMAGECONVERTER OFF MAGNUM_WITH_DISTANCEFIELDCONVERTER OFF MAGNUM_WITH_GLSLANGSHADERCONVERTER OFF MAGNUM_WITH_GLTFSCENECONVERTER OFF - MAGNUM_WITH_IMAGECONVERTER OFF + MAGNUM_WITH_IMAGECONVERTER ON MAGNUM_WITH_JPEGIMAGECONVERTER OFF MAGNUM_WITH_KTXIMAGECONVERTER OFF MAGNUM_WITH_MESHOPTIMIZERSCENECONVERTER OFF @@ -135,7 +135,7 @@ if(FLOORMAT_SUBMODULE-DEPENDENCIES) MAGNUM_WITH_SPIRVTOOLSSHADERCONVERTER OFF MAGNUM_WITH_STANFORDSCENECONVERTER OFF MAGNUM_WITH_STBRESIZEIMAGECONVERTER ON - MAGNUM_WITH_TGAIMAGECONVERTER OFF + MAGNUM_WITH_TGAIMAGECONVERTER ON MAGNUM_WITH_MAGNUMFONTCONVERTER ON MAGNUM_WITH_SHADERCONVERTER ON @@ -295,7 +295,7 @@ if(FLOORMAT_SUBMODULE-DEPENDENCIES) endif() if(fm-external-configured) - set(fm-quiet-message 1) + #set(fm-quiet-message 1) endif() find_package(SDL2 QUIET REQUIRED) find_package(Corrade QUIET REQUIRED) diff --git a/external/imgui b/external/imgui -Subproject 1e17d59965eec58b481f60cfbdca77661ab0af7 +Subproject 040e818d7215b648e216c25fa51c6093e273f65 diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 419043aa..c3174562 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -11,8 +11,8 @@ target_link_libraries(${self} PUBLIC tsl::robin_map ) -if(NOT MSVC) - target_precompile_headers(${self} REUSE_FROM floormat) -else() - target_precompile_headers(${self} PRIVATE ../src/precomp.hpp) -endif() +#if(NOT MSVC) +# target_precompile_headers(${self} REUSE_FROM floormat) +#else() +# target_precompile_headers(${self} PRIVATE ../src/precomp.hpp) +#endif() diff --git a/main/draw.cpp b/main/draw.cpp index 7dacc870..59c0feed 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -59,7 +59,7 @@ void main_impl::recalc_viewport(Vector2i fb_size, Vector2i win_size) noexcept GL::Renderer::disable(Feature::FaceCulling); GL::Renderer::disable(Feature::DepthTest); GL::Renderer::enable(Feature::Blending); - GL::Renderer::enable(Feature::ScissorTest); + GL::Renderer::disable(Feature::ScissorTest); GL::Renderer::enable(Feature::DepthClamp); GL::Renderer::setDepthFunction(DepthFunction::Greater); GL::Renderer::setScissor({{}, fb_size}); diff --git a/serialize/CMakeLists.txt b/serialize/CMakeLists.txt index 1ba22a5a..2bafd960 100644 --- a/serialize/CMakeLists.txt +++ b/serialize/CMakeLists.txt @@ -17,6 +17,7 @@ endif() if(WIN32 OR MAGNUM_BUILD_PLUGINS_STATIC) target_link_libraries(${self} PUBLIC MagnumPlugins::StbImageImporter + Magnum::AnyImageConverter Magnum::TgaImporter tsl::robin_map ) @@ -25,8 +26,8 @@ if(WIN32) target_link_libraries(${self} PUBLIC ntdll) endif() -if(NOT MSVC) - target_precompile_headers(${self} REUSE_FROM floormat) -else() - target_precompile_headers(${self} PRIVATE ../src/precomp.hpp) -endif() +#if(NOT MSVC) +# target_precompile_headers(${self} REUSE_FROM floormat) +#else() +# target_precompile_headers(${self} PRIVATE ../src/precomp.hpp) +#endif() diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp index 4b929700..92ef7287 100644 --- a/shaders/lightmap.cpp +++ b/shaders/lightmap.cpp @@ -3,17 +3,21 @@ #include "src/tile-defs.hpp" #include "loader/loader.hpp" #include "src/chunk.hpp" -#include <Corrade/Utility/Move.h> +#include "src/tile-bbox.hpp" +#include "src/tile-atlas.hpp" +#include "src/entity.hpp" +#include <utility> #include <Corrade/Containers/PairStl.h> #include <Corrade/Containers/Iterable.h> -#include <cmath> +#include <Corrade/Containers/ArrayViewStl.h> #include <Magnum/Magnum.h> +#include <Magnum/GL/Context.h> #include <Magnum/GL/MeshView.h> #include <Magnum/GL/Shader.h> #include <Magnum/GL/Version.h> -#include "src/tile-bbox.hpp" -#include "src/tile-atlas.hpp" #include <Magnum/GL/Renderer.h> +#include <Magnum/GL/TextureFormat.h> +#include <Magnum/DebugTools/Screenshot.h> #if defined __CLION_IDE__ || defined __clang__ #pragma GCC diagnostic ignored "-Wfloat-equal" @@ -23,24 +27,22 @@ namespace floormat { namespace { -// todo add back drawing an 8x8 grid +constexpr auto neighbor_count = 8; constexpr auto chunk_size = TILE_SIZE2 * TILE_MAX_DIM; constexpr auto chunk_offset = TILE_SIZE2/2; -constexpr auto image_size = iTILE_SIZE2 * TILE_MAX_DIM; +constexpr auto image_size = iTILE_SIZE2 * TILE_MAX_DIM * neighbor_count; constexpr auto clip_start = Vector2{-1, -1}; -constexpr auto clip_scale = 2/chunk_size; +constexpr auto clip_scale = 2/(chunk_size * neighbor_count); constexpr auto shadow_wall_depth = 4.f; -using Utility::forward; - -template<typename T> -GL::Mesh make_light_mesh(T vert, T index) +template<typename T, typename U> +GL::Mesh make_light_mesh(T&& vert, U&& index) { GL::Mesh mesh{GL::MeshPrimitive::Triangles}; - mesh.addVertexBuffer(forward<T>(vert), 0, lightmap_shader::Position{}) - .setIndexBuffer(forward<T>(index), 0, GL::MeshIndexType::UnsignedShort) + mesh.addVertexBuffer(std::forward<T>(vert), 0, lightmap_shader::Position{}) + .setIndexBuffer(std::forward<U>(index), 0, GL::MeshIndexType::UnsignedShort) .setCount(6); return mesh; } @@ -55,13 +57,13 @@ auto lightmap_shader::make_framebuffer(Vector2i size) -> Framebuffer framebuffer.scratch .setWrapping(GL::SamplerWrapping::ClampToBorder) .setBorderColor(Color4{0, 0, 0, 1}) - .setStorage(1, GL::TextureFormat::RGB8, size); + .setStorage(1, GL::TextureFormat::RGBA8, size); framebuffer.accum = GL::Texture2D{}; framebuffer.accum .setWrapping(GL::SamplerWrapping::ClampToBorder) .setBorderColor(Color4{0, 0, 0, 1}) - .setStorage(1, GL::TextureFormat::RGB8, size); + .setStorage(1, GL::TextureFormat::RGBA8, size); //framebuffer.depth = GL::Renderbuffer{}; //framebuffer.depth.setStorage(GL::RenderbufferFormat::DepthComponent32F, size); @@ -72,9 +74,9 @@ auto lightmap_shader::make_framebuffer(Vector2i size) -> Framebuffer .attachTexture(GL::Framebuffer::ColorAttachment{0}, framebuffer.scratch, 0) .attachTexture(GL::Framebuffer::ColorAttachment{1}, framebuffer.accum, 0) //.clearDepth(0); - .clearColor(0, Color4{0, 0, 0, 1}) + .clearColor(0, Color4{1, 0, 1, 1}) .clearColor(1, Color4{0, 0, 0, 1}); - framebuffer.fb.mapForDraw(GL::Framebuffer::ColorAttachment{0}); + //framebuffer.fb.mapForDraw(GL::Framebuffer::ColorAttachment{0}); using BF = Magnum::GL::Renderer::BlendFunction; GL::Renderer::setBlendFunction(0, BF::One, BF::Zero, BF::One, BF::Zero); @@ -95,8 +97,6 @@ GL::Mesh lightmap_shader::make_occlusion_mesh() void lightmap_shader::begin_occlusion() { count = 0; - framebuffer.fb.clearColor(0, Color4{0, 0, 0, 1}); - framebuffer.fb.clearColor(1, Color4{0, 0, 0, 1}); } void lightmap_shader::end_occlusion() @@ -176,14 +176,21 @@ lightmap_shader::lightmap_shader() framebuffer = make_framebuffer(image_size); + light_vertexes = {}; + light_vertex_buf = GL::Buffer{light_vertexes, GL::BufferUsage::DynamicDraw}; + light_mesh = make_light_mesh(light_vertex_buf, GL::Buffer{quad_indexes(0)}); + +#if 0 auto blend_vertexes = std::array<Vector3, 4>{{ { 1, -1, 0 }, /* 3--1 1 */ { 1, 1, 0 }, /* | / /| */ { -1, -1, 0 }, /* |/ / | */ { -1, 1, 0 }, /* 2 2--0 */ }}; - blend_mesh = make_light_mesh<GL::Buffer&&>(GL::Buffer{blend_vertexes}, GL::Buffer{quad_indexes(0)}); + light_mesh = make_light_mesh<GL::Buffer&&>(GL::Buffer{blend_vertexes}, GL::Buffer{quad_indexes(0)}); +#endif + framebuffer.scratch.bind(TextureSampler); setUniform(SamplerUniform, TextureSampler); setUniform(LightColorUniform, Color3{1, 1, 1}); setUniform(SizeUniform, Vector2(1)); @@ -203,7 +210,7 @@ std::array<UnsignedShort, 6> lightmap_shader::quad_indexes(size_t N) }; /* 2 2--0 */ } -void lightmap_shader::add_light(const light_s& light) +void lightmap_shader::add_light(Vector2 neighbor_offset, const light_s& light) { constexpr auto tile_size = TILE_SIZE2.sum()/2; float I; @@ -223,13 +230,15 @@ void lightmap_shader::add_light(const light_s& light) I *= tile_size; I = std::fmax(0.f, I); - auto center_fragcoord = light.center + chunk_offset; // window-relative coordinates + auto center_fragcoord = light.center + chunk_offset + neighbor_offset * chunk_size; // window-relative coordinates auto center_clip = clip_start + center_fragcoord * clip_scale; // clip coordinates float alpha = light.color.a() / 255.f; auto color = (Vector3{light.color.rgb()} / 255.f) * alpha; - setUniform(SamplerUniform, TextureSampler); + //framebuffer.fb.mapForDraw(GL::Framebuffer::ColorAttachment{0}); + framebuffer.fb.clearColor(0, Color4{0, 0, 0, 1}); + setUniform(LightColorUniform, color * alpha); setUniform(SizeUniform, 1 / chunk_size); setUniform(CenterFragcoordUniform, center_fragcoord); @@ -237,28 +246,33 @@ void lightmap_shader::add_light(const light_s& light) setUniform(RangeUniform, I); setUniform(FalloffUniform, (uint32_t)light.falloff); - framebuffer.fb.mapForDraw(GL::Framebuffer::ColorAttachment{0}); - framebuffer.fb.clearColor(0, Color4{0, 0, 0, 1}); - setUniform(ModeUniform, DrawLightmapMode); - AbstractShaderProgram::draw(blend_mesh); + const auto size = I * clip_scale; + light_vertexes = {{ + { size.x() + center_clip.x(), -size.y() + center_clip.y(), 0 }, + { size.x() + center_clip.x(), size.y() + center_clip.y(), 0 }, + { -size.x() + center_clip.x(), -size.y() + center_clip.y(), 0 }, + { -size.x() + center_clip.x(), size.y() + center_clip.y(), 0 }, + }}; + light_vertex_buf.setSubData(0, light_vertexes); + AbstractShaderProgram::draw(light_mesh); -#if 1 setUniform(ModeUniform, DrawShadowsMode); setUniform(LightColorUniform, Color3{0, 0, 0}); - setUniform(RangeUniform, 1 ); + setUniform(RangeUniform, I); fm_assert(occlusion_mesh.id()); auto mesh_view = GL::MeshView{occlusion_mesh}; mesh_view.setCount((int32_t)count*6); mesh_view.setIndexRange(0, 0, uint32_t(count*6 - 1)); AbstractShaderProgram::draw(mesh_view); -#endif #if 0 setUniform(ModeUniform, BlendLightmapMode); framebuffer.fb.mapForDraw(GL::Framebuffer::ColorAttachment{1}); AbstractShaderProgram::draw(blend_mesh); #endif + + //DebugTools::screenshot(framebuffer.fb, "../../../screenshot.bmp"); } void lightmap_shader::add_rect(Vector2 neighbor_offset, Vector2 min, Vector2 max) @@ -362,7 +376,7 @@ void lightmap_shader::add_entities(Vector2 neighbor_offset, chunk& c) void lightmap_shader::bind() { - framebuffer.scratch.bind(TextureSampler); + framebuffer.fb.mapForDraw(GL::Framebuffer::ColorAttachment{0}); framebuffer.fb.bind(); } diff --git a/shaders/lightmap.hpp b/shaders/lightmap.hpp index d555dfc5..76ef081a 100644 --- a/shaders/lightmap.hpp +++ b/shaders/lightmap.hpp @@ -47,7 +47,7 @@ struct lightmap_shader final : GL::AbstractShaderProgram void add_geometry(Vector2 neighbor_offset, chunk& c); void add_rect(Vector2 neighbor_offset, Vector2 min, Vector2 max); void add_rect(Vector2 neighbor_offset, Pair<Vector2, Vector2> minmax); - void add_light(const light_s& light); + void add_light(Vector2 neighbor_offset, const light_s& light); void bind(); GL::Texture2D& scratch_texture(); @@ -93,7 +93,9 @@ private: GL::Mesh occlusion_mesh{NoCreate}; static constexpr auto starting_capacity = 1; // todo - GL::Mesh blend_mesh{NoCreate}; + std::array<Vector3, 4> light_vertexes; + GL::Buffer light_vertex_buf{NoCreate}; + GL::Mesh light_mesh{NoCreate}; [[nodiscard]] std::array<Vector3, 4>& alloc_rect(); }; diff --git a/shaders/lightmap.vert b/shaders/lightmap.vert index 7acd83ce..90c5bc9c 100644 --- a/shaders/lightmap.vert +++ b/shaders/lightmap.vert @@ -16,12 +16,15 @@ layout (location = 0) in vec3 position; void main() { vec2 pos = position.xy; - vec2 dir = pos - center_clip; - float len = length(dir); - if (len > 1e-6) + if (mode == 0) { - vec2 dir_norm = dir * (1/len); - pos += dir_norm * position.z * 4; + vec2 dir = pos - center_clip; + float len = length(dir); + if (len > 1e-6) + { + vec2 dir_norm = dir * (1/len); + pos += dir_norm * position.z * 4; + } } gl_Position = vec4(pos, 0, 1); } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 714b4877..6222ccee 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,8 +6,9 @@ target_link_libraries( Magnum::GL Magnum::Magnum Magnum::Shaders + Magnum::DebugTools fmt::fmt tsl::robin_map ) -target_precompile_headers(${self} PRIVATE precomp.hpp) +#target_precompile_headers(${self} PRIVATE precomp.hpp) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e835c359..db154673 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -27,8 +27,8 @@ foreach(file ${saves}) configure_file("${file}" "${save-dir}" COPYONLY) endforeach() -if(NOT MSVC) - target_precompile_headers(${self}_o REUSE_FROM floormat) -else() - target_precompile_headers(${self}_o PRIVATE ../src/precomp.hpp) -endif() +#if(NOT MSVC) +# target_precompile_headers(${self}_o REUSE_FROM floormat) +#else() +# target_precompile_headers(${self}_o PRIVATE ../src/precomp.hpp) +#endif() diff --git a/userconfig-sthalik@Windows-Clang.cmake b/userconfig-sthalik@Windows-Clang.cmake index 27ce4046..ebd8aa48 100644 --- a/userconfig-sthalik@Windows-Clang.cmake +++ b/userconfig-sthalik@Windows-Clang.cmake @@ -129,5 +129,6 @@ function(fm-userconfig-src) -Wno-error=ambiguous-reversed-operator -Wno-error=comma -Wno-error=weak-vtables + -Wno-error=unreachable-code ) endfunction() |