diff --git a/Traction.cpp b/Traction.cpp index bddcb2ce..aa4bf3e3 100644 --- a/Traction.cpp +++ b/Traction.cpp @@ -529,7 +529,8 @@ glm::vec3 TTraction::wire_color() const { glm::vec3 color; - if( false == DebugModeFlag ) { + if( !DebugModeFlag || GfxRenderer.settings.force_normal_traction_render ) + { switch( Material ) { // Ra: kolory podzieliłem przez 2, bo po zmianie ambient za jasne były // trzeba uwzględnić kierunek świecenia Słońca - tylko ze Słońcem widać kolor case 1: { diff --git a/driveruipanels.cpp b/driveruipanels.cpp index 86609b87..4724e315 100644 --- a/driveruipanels.cpp +++ b/driveruipanels.cpp @@ -365,6 +365,14 @@ debug_panel::render() { // toggles ImGui::Separator(); ImGui::Checkbox( "Debug Mode", &DebugModeFlag ); + if( DebugModeFlag ) + { + ImGui::Indent(); + ImGui::Checkbox( + "Draw normal traction", + &GfxRenderer.settings.force_normal_traction_render ); + ImGui::Unindent(); + } } ImGui::End(); } diff --git a/renderer.h b/renderer.h index 499d19a9..cf8a5b4f 100644 --- a/renderer.h +++ b/renderer.h @@ -115,6 +115,12 @@ class opengl_renderer { public: // types + /// Renderer runtime settings. + struct Settings + { + /** Force normal render of traction, when user is in debug mode. */ + bool force_normal_traction_render { false }; + } settings; // constructors opengl_renderer() = default; // destructor