Requires OpenGL 3.3 as a minimum to enable instanced rendering of seams and other options in preview
This commit is contained in:
parent
c797bed67d
commit
d7bb4c36f5
2 changed files with 2 additions and 2 deletions
|
@ -807,7 +807,7 @@ void GCodeViewer::render()
|
||||||
case EMoveType::Unretract:
|
case EMoveType::Unretract:
|
||||||
case EMoveType::Seam: {
|
case EMoveType::Seam: {
|
||||||
#if ENABLE_SEAMS_USING_MODELS
|
#if ENABLE_SEAMS_USING_MODELS
|
||||||
if (wxGetApp().is_gl_version_greater_or_equal_to(3, 1)) {
|
if (wxGetApp().is_gl_version_greater_or_equal_to(3, 3)) {
|
||||||
buffer.render_primitive_type = TBuffer::ERenderPrimitiveType::Model;
|
buffer.render_primitive_type = TBuffer::ERenderPrimitiveType::Model;
|
||||||
buffer.shader = "gouraud_light_instanced";
|
buffer.shader = "gouraud_light_instanced";
|
||||||
buffer.model.model.init_from(diamond(16));
|
buffer.model.model.init_from(diamond(16));
|
||||||
|
|
|
@ -39,7 +39,7 @@ std::pair<bool, std::string> GLShadersManager::init()
|
||||||
valid &= append_shader("printbed", { "printbed.vs", "printbed.fs" });
|
valid &= append_shader("printbed", { "printbed.vs", "printbed.fs" });
|
||||||
// used to render options in gcode preview
|
// used to render options in gcode preview
|
||||||
#if ENABLE_SEAMS_USING_MODELS
|
#if ENABLE_SEAMS_USING_MODELS
|
||||||
if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 1))
|
if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 3))
|
||||||
valid &= append_shader("gouraud_light_instanced", { "gouraud_light_instanced.vs", "gouraud_light_instanced.fs" });
|
valid &= append_shader("gouraud_light_instanced", { "gouraud_light_instanced.vs", "gouraud_light_instanced.fs" });
|
||||||
else {
|
else {
|
||||||
#endif // ENABLE_SEAMS_USING_MODELS
|
#endif // ENABLE_SEAMS_USING_MODELS
|
||||||
|
|
Loading…
Reference in a new issue