working on piping events through to the rendered sprites, ztesting, focus, etc.

This commit is contained in:
2020-08-02 22:36:21 -07:00
parent ea98b7e7d6
commit 2ea20c4c0a
4 changed files with 89 additions and 59 deletions

View File

@@ -386,13 +386,14 @@ impl CanvasState {
/// Consume and allocate the canvas frame data to the GPU
pub fn allocate(&mut self, canvas_frame: CanvasFrame) -> CanvasFrameAllocation {
let mut colored_vertex_buffer: Vec<ColorVertex3D> = Vec::default();
let mut textured_vertex_buffer: HashMap<Arc<CanvasTextureHandle>, Vec<TextureVertex3D>> = HashMap::new();
let mut image_vertex_buffer: HashMap<Arc<CanvasImageHandle>, Vec<ImageVertex3D>> = HashMap::new();
let mut text_instances: HashMap<Arc<CanvasFontHandle>, Vec<TextVertex3D>> = HashMap::new();
let mut text_vertex_buffer: Vec<ColorVertex3D> = Vec::new();
// separate the mux of vertex containers back out
for value in canvas_frame.map {
match value {
VertexType::TextureType(vertices, handle) => {