mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Follow-up of fdf8b11d4cfa793d1e45d82560d4bd97d0466d40 - Fixed GLGizmoSlaSupports::render_points()
(cherry picked from commit prusa3d/PrusaSlicer@0c74081f7d)
This commit is contained in:
		
							parent
							
								
									dde64acf72
								
							
						
					
					
						commit
						dd51ce3b90
					
				
					 1 changed files with 8 additions and 10 deletions
				
			
		|  | @ -127,13 +127,12 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking) | |||
|     if (! has_points && ! has_holes) | ||||
|         return; | ||||
| 
 | ||||
|     GLShaderProgram* shader = picking ? nullptr : wxGetApp().get_shader("gouraud_light"); | ||||
|     if (shader != nullptr) | ||||
|         shader->start_using(); | ||||
|     ScopeGuard guard([shader]() { | ||||
|         if (shader != nullptr) | ||||
|             shader->stop_using(); | ||||
|     }); | ||||
|     GLShaderProgram* shader = wxGetApp().get_shader(picking ? "flat" : "gouraud_light"); | ||||
|     if (shader == nullptr) | ||||
|         return; | ||||
| 
 | ||||
|     shader->start_using(); | ||||
|     ScopeGuard guard([shader]() { shader->stop_using(); }); | ||||
| 
 | ||||
|     const GLVolume* vol = selection.get_volume(*selection.get_volume_idxs().begin()); | ||||
|     const Transform3d& instance_scaling_matrix_inverse = vol->get_instance_transformation().get_matrix(true, true, false, true).inverse(); | ||||
|  | @ -176,7 +175,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking) | |||
| 
 | ||||
|         m_cone.set_color(render_color); | ||||
|         m_sphere.set_color(render_color); | ||||
|         if (shader && !picking) | ||||
|         if (!picking) | ||||
|             shader->set_uniform("emission_factor", 0.5f); | ||||
| 
 | ||||
|         // Inverse matrix of the instance scaling is applied so that the mark does not scale with the object.
 | ||||
|  | @ -228,8 +227,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking) | |||
|     if (has_holes && ! picking) { | ||||
|         render_color = { 0.7f, 0.7f, 0.7f, 0.7f }; | ||||
|         m_cylinder.set_color(render_color); | ||||
|         if (shader) | ||||
|             shader->set_uniform("emission_factor", 0.5f); | ||||
|         shader->set_uniform("emission_factor", 0.5f); | ||||
|         for (const sla::DrainHole& drain_hole : m_c->selection_info()->model_object()->sla_drain_holes) { | ||||
|             if (is_mesh_point_clipped(drain_hole.pos.cast<double>())) | ||||
|                 continue; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966