mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
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
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue