do not spend time drawing text with is_visible = false (#893)
do not draw text with is_visible = false
This commit is contained in:
		
							parent
							
								
									1e9a0544bd
								
							
						
					
					
						commit
						eb587b2f10
					
				@ -153,6 +153,10 @@ pub fn draw_text_system(
 | 
			
		||||
    let vertex_buffer_descriptor = font_quad.get_vertex_buffer_descriptor();
 | 
			
		||||
 | 
			
		||||
    for (entity, mut draw, text, node, global_transform) in query.iter_mut() {
 | 
			
		||||
        if !draw.is_visible {
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if let Some(text_glyphs) = text_pipeline.get_glyphs(&entity) {
 | 
			
		||||
            let position = global_transform.translation - (node.size / 2.0).extend(0.0);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user