mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-13 07:23:03 +00:00
phong in preview mode
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "libslic3r/Print.hpp"
|
||||
#include "libslic3r/Geometry.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "libslic3r/LocalesUtils.hpp"
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
@@ -222,7 +223,11 @@ void GCodeViewer::SequentialView::Marker::render(int canvas_width, int canvas_he
|
||||
if (!m_visible)
|
||||
return;
|
||||
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
const bool reflections = wxGetApp().app_config != nullptr &&
|
||||
wxGetApp().app_config->get(SETTING_OPENGL_SHADING_MODEL) == "phong";
|
||||
GLShaderProgram* shader = wxGetApp().get_shader(reflections ? "phong" : "gouraud_light");
|
||||
if (shader == nullptr)
|
||||
shader = wxGetApp().get_shader("gouraud_light");
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
@@ -2414,7 +2419,11 @@ void GCodeViewer::render_shells(int canvas_width, int canvas_height)
|
||||
//if (!m_shells.visible || m_shells.volumes.empty())
|
||||
return;
|
||||
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
const bool reflections = wxGetApp().app_config != nullptr &&
|
||||
wxGetApp().app_config->get(SETTING_OPENGL_SHADING_MODEL) == "phong";
|
||||
GLShaderProgram* shader = wxGetApp().get_shader(reflections ? "phong" : "gouraud_light");
|
||||
if (shader == nullptr)
|
||||
shader = wxGetApp().get_shader("gouraud_light");
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user