diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index dd1fb7238..e270385f9 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -44,6 +44,8 @@ void Editor::Initialize() //infoDisplay.heap_allocation_counter = true; //infoDisplay.vram_usage = true; + wi::backlog::setFontColor(wi::Color(130, 210, 220, 255)); + wi::renderer::SetOcclusionCullingEnabled(true); loader.Load(); @@ -52,7 +54,7 @@ void Editor::Initialize() loader.addLoadingComponent(&renderComponent, this, 0.2f); - ActivatePath(&loader, 0.2f); + ActivatePath(&loader); } diff --git a/WickedEngine/wiBacklog.cpp b/WickedEngine/wiBacklog.cpp index 1eb0e45cd..ec35baa16 100644 --- a/WickedEngine/wiBacklog.cpp +++ b/WickedEngine/wiBacklog.cpp @@ -259,10 +259,11 @@ namespace wi::backlog { std::scoped_lock lock(logLock); wi::font::SetCanvas(canvas); // always set here as it can be called from outside... - font_params.cursor = {}; + wi::font::Params params = font_params; + params.cursor = {}; if (refitscroll) { - float textheight = wi::font::TextHeight(getTextWithoutLock(), font_params); + float textheight = wi::font::TextHeight(getTextWithoutLock(), params); float limit = canvas.GetLogicalHeight() - 35; if (scroll + textheight > limit) { @@ -270,28 +271,28 @@ namespace wi::backlog } refitscroll = false; } - font_params.posX = 5; - font_params.posY = pos + scroll; - font_params.h_wrap = canvas.GetLogicalWidth() - font_params.posX; + params.posX = 5; + params.posY = pos + scroll; + params.h_wrap = canvas.GetLogicalWidth() - params.posX; if (colorspace != ColorSpace::SRGB) { - font_params.enableLinearOutputMapping(9); + params.enableLinearOutputMapping(9); } for (auto& x : entries) { switch (x.level) { case LogLevel::Warning: - font_params.color = wi::Color::Warning(); + params.color = wi::Color::Warning(); break; case LogLevel::Error: - font_params.color = wi::Color::Error(); + params.color = wi::Color::Error(); break; default: - font_params.color = wi::Color::White(); + params.color = font_params.color; break; } - font_params.cursor = wi::font::Draw(x.text, font_params, cmd); + params.cursor = wi::font::Draw(x.text, params, cmd); } } @@ -409,6 +410,10 @@ namespace wi::backlog { font_params.spacingY = value; } + void setFontColor(wi::Color color) + { + font_params.color = color; + } bool isActive() { return enabled; } diff --git a/WickedEngine/wiBacklog.h b/WickedEngine/wiBacklog.h index 389830b99..8169a14a7 100644 --- a/WickedEngine/wiBacklog.h +++ b/WickedEngine/wiBacklog.h @@ -2,6 +2,7 @@ #include "CommonInclude.h" #include "wiGraphicsDevice.h" #include "wiCanvas.h" +#include "wiColor.h" #include @@ -42,6 +43,7 @@ namespace wi::backlog void setBackground(wi::graphics::Texture* texture); void setFontSize(int value); void setFontRowspacing(float value); + void setFontColor(wi::Color color); void Lock(); void Unlock(); diff --git a/WickedEngine/wiRenderer.cpp b/WickedEngine/wiRenderer.cpp index 908e35055..cf12efc99 100644 --- a/WickedEngine/wiRenderer.cpp +++ b/WickedEngine/wiRenderer.cpp @@ -713,7 +713,7 @@ bool LoadShader( if (!output.error_message.empty()) { - wi::backlog::post(output.error_message); + wi::backlog::post(output.error_message, wi::backlog::LogLevel::Warning); } wi::backlog::post("shader compiled: " + shaderbinaryfilename); return device->CreateShader(stage, output.shaderdata, output.shadersize, &shader); diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 966ffd200..b5da8b874 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 71; // minor bug fixes, alterations, refactors, updates - const int revision = 109; + const int revision = 110; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);