fix view leak and add view count
This commit is contained in:
@@ -4,7 +4,7 @@ use std::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
layout::{Color, TextureHandle, UiRegion},
|
||||
layout::{Color, UiRegion},
|
||||
render::{ArrBuf, data::PrimitiveInstance},
|
||||
};
|
||||
use bytemuck::Pod;
|
||||
@@ -14,8 +14,6 @@ pub struct Primitives {
|
||||
pub(super) instances: Vec<PrimitiveInstance>,
|
||||
pub(super) run: Vec<PrimitiveInstance>,
|
||||
pub(super) data: PrimitiveData,
|
||||
// ensure drawn textures don't get freed
|
||||
pub(crate) drawn_textures: Vec<TextureHandle>,
|
||||
pub updated: bool,
|
||||
run_start: usize,
|
||||
}
|
||||
@@ -26,7 +24,6 @@ impl Default for Primitives {
|
||||
instances: Default::default(),
|
||||
run: Default::default(),
|
||||
data: Default::default(),
|
||||
drawn_textures: Default::default(),
|
||||
updated: true,
|
||||
run_start: 0,
|
||||
}
|
||||
@@ -117,7 +114,6 @@ impl Primitives {
|
||||
self.instances.clear();
|
||||
self.run.clear();
|
||||
self.data.clear();
|
||||
self.drawn_textures.clear();
|
||||
}
|
||||
|
||||
pub fn set<P: Primitive>(&mut self, handle: &PrimitiveHandle<P>, data: P) {
|
||||
|
||||
Reference in New Issue
Block a user