@ -166,13 +166,31 @@ pub fn main() {
let mut compu_frame = CompuFrame ::new ( ) ;
compu_frame . add ( compute_buffer . clone ( ) , compute_kernel . clone ( ) ) ;
compu_frame . add_with_image_swap ( compute_buffer . clone ( ) , compute_kernel . clone ( ) , & compu_sprite1 ) ;
// compu_frame.add_with_image_swap(compute_buffer.clone(), compute_kernel.clone(), &compu_sprite1);
let mut canvas = CanvasFrame ::new ( ) ;
canvas . draw ( & sprite ) ;
canvas . draw ( & sprite2 ) ;
canvas . draw ( & sprite3 ) ;
// canvas.draw(&sprite);
// canvas.draw(&sprite2);
// canvas.draw(&sprite3);
canvas . draw ( & compu_sprite1 ) ;
canvas . draw ( & Sprite ::new_with_color ( (
( elapsed_time + 0.0 ) . sin ( ) / 2.0 , ( elapsed_time + 0.0 ) . sin ( ) / 2.0 ) ,
( 0.09 , 0.09 ) ,
( 1.0 , 0.2 , 0.5 , 1.0 )
) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.0 ) . sin ( ) , 0.0 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.1 ) . sin ( ) , 0.1 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.2 ) . sin ( ) , 0.2 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.3 ) . sin ( ) , 0.3 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.4 ) . sin ( ) , 0.4 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.5 ) . sin ( ) , 0.5 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.6 ) . sin ( ) , 0.6 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.7 ) . sin ( ) , 0.7 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.8 ) . sin ( ) , 0.8 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
canvas . draw ( & Sprite ::new_with_color ( ( ( elapsed_time + 0.9 ) . sin ( ) , 0.9 ) , ( 0.09 , 0.09 ) , ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ) ;
{
let g = hprof ::enter ( "Run" ) ;
processor . run ( & surface ,