mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 12:49:18 +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 {
|
TTraction::wire_color() const {
|
||||||
|
|
||||||
glm::vec3 color;
|
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
|
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
|
// trzeba uwzględnić kierunek świecenia Słońca - tylko ze Słońcem widać kolor
|
||||||
case 1: {
|
case 1: {
|
||||||
|
|||||||
@@ -365,6 +365,14 @@ debug_panel::render() {
|
|||||||
// toggles
|
// toggles
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Checkbox( "Debug Mode", &DebugModeFlag );
|
ImGui::Checkbox( "Debug Mode", &DebugModeFlag );
|
||||||
|
if( DebugModeFlag )
|
||||||
|
{
|
||||||
|
ImGui::Indent();
|
||||||
|
ImGui::Checkbox(
|
||||||
|
"Draw normal traction",
|
||||||
|
&GfxRenderer.settings.force_normal_traction_render );
|
||||||
|
ImGui::Unindent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,6 +116,12 @@ class opengl_renderer {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// types
|
// 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
|
// constructors
|
||||||
opengl_renderer() = default;
|
opengl_renderer() = default;
|
||||||
// destructor
|
// destructor
|
||||||
|
|||||||
Reference in New Issue
Block a user