starting to hook up the compute frame translation.

This commit is contained in:
2019-08-28 21:48:25 -07:00
parent a3607ebc7d
commit 885e19fb64
4 changed files with 192 additions and 184 deletions

View File

@@ -44,10 +44,6 @@ Canvas works, but I want to use CPU accessible buffer instead of immutable buffe
Texturing is broken
Compute is running in the background, but don't have a way to draw it.
Would like to draw it to a sprite???
8/13 :
Okay. So I've decided to keep compute image and compute kernel in their own 'canvas'
@@ -193,9 +189,9 @@ fn main() {
let mut window = surface.window();
let mut processor = vkprocessor::VkProcessor::new(&instance, &surface);
processor.compile_kernel(String::from("simple-edge.compute"));
processor.load_compute_image(String::from("background.jpg"));
processor.load_textures(String::from("funky-bird.jpg"));
// processor.compile_kernel(String::from("simple-edge.compute"));
// processor.load_compute_image(String::from("background.jpg"));
// processor.load_textures(String::from("funky-bird.jpg"));
processor.create_swapchain(&surface);
let mut timer = Timer::new();
@@ -231,6 +227,9 @@ fn main() {
let compute_kernel = processor.get_kernel_handle(String::from("simple-edge.compute"))
.expect("Can't find that kernel");
while let Some(p) = window.get_position() {
elapsed_time = timer.elap_time();
@@ -262,7 +261,7 @@ fn main() {
match keyboard_input.virtual_keycode.unwrap() {
VirtualKeyCode::A => {
if keyboard_input.state == ElementState::Pressed {
processor.save_edges_image();
// processor.save_edges_image();
}
}
_ => ()