had a bit of a time finding the problem with the specialization constants being unimplemented. Adding an impl lets rust elicit the pipeline type so I can store it, thank god
This commit is contained in:
29
src/main.rs
29
src/main.rs
@@ -43,6 +43,8 @@ use vulkano::sync::GpuFuture;
|
||||
use shaderc::CompileOptions;
|
||||
use shade_runner::CompileError;
|
||||
use crate::workpiece::{WorkpieceLoader, Workpiece};
|
||||
use winit::{EventsLoop, WindowBuilder};
|
||||
use vulkano_win::VkSurfaceBuild;
|
||||
|
||||
mod slider;
|
||||
mod timer;
|
||||
@@ -82,16 +84,37 @@ Let's take a look at how easy it would be to replace SFML...
|
||||
|
||||
fn main() {
|
||||
|
||||
let font = Font::from_file("resources/fonts/sansation.ttf").unwrap();
|
||||
let instance = {
|
||||
let extensions = vulkano_win::required_extensions();
|
||||
Instance::new(None, &extensions, None).unwrap()
|
||||
};
|
||||
|
||||
let mut events_loop = EventsLoop::new();
|
||||
let mut surface = WindowBuilder::new()
|
||||
.build_vk_surface(&events_loop, instance.clone()).unwrap();
|
||||
let mut window = surface.window();
|
||||
|
||||
|
||||
let mut processor = vkprocessor::VkProcessor::new(&instance, &surface);
|
||||
|
||||
let instance = Instance::new(None, &InstanceExtensions::none(), None).unwrap();
|
||||
let mut processor = vkprocessor::VkProcessor::new(&instance);
|
||||
processor.compile_kernel(String::from("simple-edge.compute"));
|
||||
processor.load_buffers(String::from("funky-bird.jpg"));
|
||||
processor.run_kernel();
|
||||
processor.read_image();
|
||||
processor.save_image();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let font = Font::from_file("resources/fonts/sansation.ttf").unwrap();
|
||||
|
||||
|
||||
|
||||
let mut window = RenderWindow::new(
|
||||
(900, 900),
|
||||
"Custom drawable",
|
||||
|
||||
Reference in New Issue
Block a user