mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fixed screen-size for point markers used to visualize retraction/unretractions and other options in preview
This commit is contained in:
		
							parent
							
								
									9b3ff9b1cf
								
							
						
					
					
						commit
						e04c6a4d17
					
				
					 4 changed files with 41 additions and 2 deletions
				
			
		|  | @ -65,4 +65,12 @@ | |||
| #define ENABLE_CTRL_M_ON_WINDOWS (0 && ENABLE_2_3_0_ALPHA3) | ||||
| 
 | ||||
| 
 | ||||
| //===================
 | ||||
| // 2.3.0.alpha4 techs
 | ||||
| //===================
 | ||||
| #define ENABLE_2_3_0_ALPHA4 1 | ||||
| 
 | ||||
| #define ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS (1 && ENABLE_GCODE_VIEWER && ENABLE_2_3_0_ALPHA4) | ||||
| 
 | ||||
| 
 | ||||
| #endif // _prusaslicer_technologies_h_
 | ||||
|  |  | |||
|  | @ -1883,7 +1883,11 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool | |||
| 
 | ||||
| void GCodeViewer::render_toolpaths() const | ||||
| { | ||||
| #if ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS | ||||
|     float point_size = 20.0f; | ||||
| #else | ||||
|     float point_size = 0.8f; | ||||
| #endif // ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
 | ||||
|     std::array<float, 4> light_intensity = { 0.25f, 0.70f, 0.75f, 0.75f }; | ||||
|     const Camera& camera = wxGetApp().plater()->get_camera(); | ||||
|     double zoom = camera.get_zoom(); | ||||
|  | @ -1899,6 +1903,11 @@ void GCodeViewer::render_toolpaths() const | |||
|     auto render_as_points = [this, zoom, point_size, near_plane_height, set_uniform_color] | ||||
|     (const TBuffer& buffer, unsigned int index_buffer_id, EOptionsColors color_id, GLShaderProgram& shader) { | ||||
|         set_uniform_color(Options_Colors[static_cast<unsigned int>(color_id)], shader); | ||||
| #if ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS | ||||
|         shader.set_uniform("use_fixed_screen_size", 1); | ||||
| #else | ||||
|         shader.set_uniform("use_fixed_screen_size", 0); | ||||
| #endif // ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
 | ||||
|         shader.set_uniform("zoom", zoom); | ||||
|         shader.set_uniform("percent_outline_radius", 0.0f); | ||||
|         shader.set_uniform("percent_center_radius", 0.33f); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966