@ -392,7 +392,7 @@ impl CanvasState {
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 < Text Vertex3D> = Vec ::new ( ) ;
let mut text_vertex_buffer : Vec < Color Vertex3D> = Vec ::new ( ) ;
for value in canvas_frame . map {
match value {
@ -542,29 +542,58 @@ impl CanvasState {
}
}
self . dynamic_state = DynamicState {
line_width : None ,
viewports : self . dynamic_state . viewports . clone ( ) ,
scissors : None ,
compare_mask : Some ( DynamicStencilValue {
face : StencilFaceFlags ::StencilFrontAndBack ,
value : 0xFF ,
} ) ,
write_mask : Some ( DynamicStencilValue {
face : StencilFaceFlags ::StencilFrontAndBack ,
value : 0xFF ,
} ) ,
reference : Some ( DynamicStencilValue {
face : StencilFaceFlags ::StencilFrontAndBack ,
value : 0xFF ,
} ) ,
} ;
// Text
let mut shader = self . shader_buffers . get (
self . get_shader_handle ( String ::from ( "simple_text" ) )
. unwrap ( ) . clone ( ) . get_handle ( ) as usize
) . unwrap ( ) ;
//
// self.dynamic_state = DynamicState {
// line_width: None,
// viewports: self.dynamic_state.viewports.clone(),
// scissors: None,
// compare_mask: Some(DynamicStencilValue {
// face: StencilFaceFlags::StencilFrontAndBack,
// value: 0x00,
// }),
// write_mask: Some(DynamicStencilValue {
// face: StencilFaceFlags::StencilFrontAndBack,
// value: 0xFF,
// }),
// reference: Some(DynamicStencilValue {
// face: StencilFaceFlags::StencilFrontAndBack,
// value: 0x00,
// }),
// };
//
// if !allocated_buffers.text_vertex_buffer.is_empty() {
// command_buffer = command_buffer.draw(
// shader.get_pipeline().clone(),
// &self.dynamic_state.clone(),
// allocated_buffers.text_vertex_buffer.clone(),
// (), (),
// ).unwrap();
// }
//
// self.dynamic_state = DynamicState {
// line_width: None,
// viewports: self.dynamic_state.viewports.clone(),
// scissors: None,
// compare_mask: Some(DynamicStencilValue {
// face: StencilFaceFlags::StencilFrontAndBack,
// value: 0xFF,
// }),
// write_mask: Some(DynamicStencilValue {
// face: StencilFaceFlags::StencilFrontAndBack,
// value: 0x00,
// }),
// reference: Some(DynamicStencilValue {
// face: StencilFaceFlags::StencilFrontAndBack,
// value: 0x00,
// }),
// };
if ! allocated_buffers . text_vertex_buffer . is_empty ( ) {
command_buffer = command_buffer . draw (
@ -575,6 +604,7 @@ impl CanvasState {
) . unwrap ( ) ;
}
command_buffer
. end_render_pass ( )
. unwrap ( )