16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +02:00
This commit is contained in:
milek7
2019-01-20 23:50:26 +01:00
3 changed files with 16 additions and 1 deletions

View File

@@ -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: {

View File

@@ -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();
}

View File

@@ -116,6 +116,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