mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
Merge branch 'master' of https://github.com/eu07/maszyna
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user