diff --git a/src/slic3r/GUI/GLModel.cpp b/src/slic3r/GUI/GLModel.cpp index d77ab7ef8..06fa16af6 100644 --- a/src/slic3r/GUI/GLModel.cpp +++ b/src/slic3r/GUI/GLModel.cpp @@ -916,23 +916,26 @@ void GLModel::create_or_update_mats_vbo(unsigned int &vbo, const std::vector &range) { + if (instance_mats_vbo == 0 || instances_count == 0) { + return; + } if (m_render_data.size() != 1) { return; } GLShaderProgram *shader = wxGetApp().get_current_shader(); if (shader == nullptr) return; diff --git a/src/slic3r/GUI/OpenGLManager.cpp b/src/slic3r/GUI/OpenGLManager.cpp index 3f38e15bc..4c0577407 100644 --- a/src/slic3r/GUI/OpenGLManager.cpp +++ b/src/slic3r/GUI/OpenGLManager.cpp @@ -236,6 +236,7 @@ OpenGLManager::~OpenGLManager() bool OpenGLManager::init_gl(bool popup_error) { if (!m_gl_initialized) { + glewExperimental = GL_TRUE; GLenum result = glewInit(); if (result != GLEW_OK) { BOOST_LOG_TRIVIAL(error) << "Unable to init glew library"; diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 2a6ff4511..1fb861a2a 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -4766,6 +4766,7 @@ void PartPlateList::render_instance_grid(bool bottom) void PartPlateList::render_instance_background(bool force_default_color) { + if (m_unselected_plate_trans.size() == 0) { return; } // draw background ColorRGBA color; if (!force_default_color) {