starting to hook up the compute frame translation.
This commit is contained in:
15
src/main.rs
15
src/main.rs
@@ -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();
|
||||
}
|
||||
}
|
||||
_ => ()
|
||||
|
||||
Reference in New Issue
Block a user