Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
fix object exclusion regression on BBL printers
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftFever committed Jan 4, 2024
1 parent 65ac5ce commit cb537a4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/slic3r/GUI/GLCanvas3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,11 @@ void GLCanvas3D::render_thumbnail(ThumbnailData& thumbnail_data, unsigned int w,
void GLCanvas3D::render_thumbnail(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, const ThumbnailsParams& thumbnail_params,
const GLVolumeCollection& volumes, Camera::EType camera_type, bool use_top_view, bool for_picking)
{
GLShaderProgram* shader = wxGetApp().get_shader("thumbnail");
GLShaderProgram* shader = nullptr;
if (for_picking)
shader = wxGetApp().get_shader("flat");
else
shader = wxGetApp().get_shader("thumbnail");
ModelObjectPtrs& model_objects = GUI::wxGetApp().model().objects;
std::vector<ColorRGBA> colors = ::get_extruders_colors();
switch (OpenGLManager::get_framebuffers_type())
Expand Down Expand Up @@ -5678,6 +5682,7 @@ void GLCanvas3D::render_thumbnail_internal(ThumbnailData& thumbnail_data, const
//if (OpenGLManager::can_multisample())
// This flag is often ignored by NVIDIA drivers if rendering into a screen buffer.
// glsafe(::glDisable(GL_MULTISAMPLE));
shader->start_using();

glsafe(::glDisable(GL_BLEND));

Expand Down Expand Up @@ -5709,8 +5714,6 @@ void GLCanvas3D::render_thumbnail_internal(ThumbnailData& thumbnail_data, const
const Transform3d model_matrix = vol->world_matrix();
shader->set_uniform("view_model_matrix", view_matrix * model_matrix);
shader->set_uniform("projection_matrix", projection_matrix);
const Matrix3d view_normal_matrix = view_matrix.matrix().block(0, 0, 3, 3) * model_matrix.matrix().block(0, 0, 3, 3).inverse().transpose();
shader->set_uniform("view_normal_matrix", view_normal_matrix);
vol->simple_render(shader, model_objects, extruder_colors);
vol->is_active = is_active;
}
Expand Down

0 comments on commit cb537a4

Please sign in to comment.