diagramming out what I want to do here. CanvasFont will live with the buffers. Need to figure out how and where I'm going to query the font data for rendering

This commit is contained in:
2019-10-09 20:44:56 -07:00
parent b1b081af87
commit e5ba27c353
7 changed files with 136 additions and 208 deletions

View File

@@ -97,6 +97,13 @@ pub fn main() {
let funky_sprite = Sprite::new_with_texture((0.0, -0.5), (0.5, 0.5), 0, funky_handle.clone());
let sfml_sprite = Sprite::new_with_texture((0.0, -0.5), (0.5, 0.5), 1, sfml_handle.clone());
// ========================
// Creating a new text... This is just something to interface with the
// canvas_frame. So it can be mutable
let text_sprite = TextSprite::new();
let test_polygon = Poly::new_with_color((-0.5, -0.5), (0.5, 0.5), 1, (1.0,0.0,0.0,0.0));
drop(q2);
@@ -156,16 +163,18 @@ pub fn main() {
compu_frame.add(compute_buffer.clone(), compute_kernel.clone());
compu_frame.add_with_image_swap(compute_buffer.clone(), compute_kernel.clone(), &compu_sprite1);
if elapsed_time > (count) as f32 {
count += 1;
compu_frame.add_chained(compute_buffer.clone(), compute_buffer.clone(), compute_kernel.clone());
}
// if elapsed_time > (count) as f32 {
// count += 1;
// compu_frame.add_chained(compute_buffer.clone(), compute_buffer.clone(), compute_kernel.clone());
// }
let mut canvas = CanvasFrame::new();
canvas.draw(&funky_sprite);
canvas.draw(&test_polygon);
{
let g = hprof::enter("Run");
processor.run(&surface,