mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Disabled back face culling to show broken geometry
This commit is contained in:
		
							parent
							
								
									1f3f109263
								
							
						
					
					
						commit
						6298a28494
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		|  | @ -1316,12 +1316,18 @@ sub Render { | ||||||
|             $self->mark_volumes_for_layer_height; |             $self->mark_volumes_for_layer_height; | ||||||
|             $self->volumes->set_print_box($self->bed_bounding_box->x_min, $self->bed_bounding_box->y_min, 0.0, $self->bed_bounding_box->x_max, $self->bed_bounding_box->y_max, $self->{config}->get('max_print_height')); |             $self->volumes->set_print_box($self->bed_bounding_box->x_min, $self->bed_bounding_box->y_min, 0.0, $self->bed_bounding_box->x_max, $self->bed_bounding_box->y_max, $self->{config}->get('max_print_height')); | ||||||
|             $self->volumes->update_outside_state($self->{config}, 0); |             $self->volumes->update_outside_state($self->{config}, 0); | ||||||
|  |             # do not cull backfaces to show broken geometry, if any | ||||||
|  |             glDisable(GL_CULL_FACE); | ||||||
|         } |         } | ||||||
|         $self->{plain_shader}->enable if $self->{plain_shader}; |         $self->{plain_shader}->enable if $self->{plain_shader}; | ||||||
|         $self->volumes->render_VBOs; |         $self->volumes->render_VBOs; | ||||||
|         $self->{plain_shader}->disable; |         $self->{plain_shader}->disable; | ||||||
|  |         glEnable(GL_CULL_FACE) if ($self->enable_picking); | ||||||
|     } else { |     } else { | ||||||
|  |         # do not cull backfaces to show broken geometry, if any | ||||||
|  |         glDisable(GL_CULL_FACE) if ($self->enable_picking); | ||||||
|         $self->volumes->render_legacy; |         $self->volumes->render_legacy; | ||||||
|  |         glEnable(GL_CULL_FACE) if ($self->enable_picking); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     # draw cutting plane |     # draw cutting plane | ||||||
|  | @ -1358,6 +1364,9 @@ sub draw_volumes { | ||||||
|     # $fakecolor is a boolean indicating, that the objects shall be rendered in a color coding the object index for picking. |     # $fakecolor is a boolean indicating, that the objects shall be rendered in a color coding the object index for picking. | ||||||
|     my ($self, $fakecolor) = @_; |     my ($self, $fakecolor) = @_; | ||||||
|      |      | ||||||
|  |     # do not cull backfaces to show broken geometry, if any | ||||||
|  |     glDisable(GL_CULL_FACE); | ||||||
|  |      | ||||||
|     glEnable(GL_BLEND); |     glEnable(GL_BLEND); | ||||||
|     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||||||
|      |      | ||||||
|  | @ -1386,6 +1395,8 @@ sub draw_volumes { | ||||||
|     glDisableClientState(GL_NORMAL_ARRAY); |     glDisableClientState(GL_NORMAL_ARRAY); | ||||||
|     glDisable(GL_BLEND); |     glDisable(GL_BLEND); | ||||||
| 
 | 
 | ||||||
|  |     glEnable(GL_CULL_FACE); | ||||||
|  |      | ||||||
|     if (defined $self->cutting_plane_z) { |     if (defined $self->cutting_plane_z) { | ||||||
|         glLineWidth(2); |         glLineWidth(2); | ||||||
|         glColor3f(0, 0, 0); |         glColor3f(0, 0, 0); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri