1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
//! This crate aims to make the use of [`vulkano`] quicker and easier when working on small project. //! //! //! # Example //! ``` //! # #[macro_use] //! # extern crate geyser; //! use geyser::Cryo; //! //! // Instantiate vulkano //! let cryo = Cryo::new(); //! //! // Create compute pipeline //! let pipeline = compute_pipeline!( //! inst, //! src: " //! #version 450 //! //! layout(set = 0, binding = 0) buffer Data { //! uint data[]; //! } buf; //! //! void main() { //! uint idx = gl_GlobalInvocationID.x; //! //! buf.data[idx] = idx * 12; //! } //! "); //! //! // Create buffer //! let buf = cryo.buffer_from_data(vec![0; 69]).expect("Failed to create buffer"); //! //! // Create descriptor set //! let set = descriptor_set!([buf], pipeline); //! //! // Dispatch //! cryo.dispatch([69, 1, 1], pipeline.clone(), set.clone()); //! //! // Display the results //! buf.read().expect("Failed to read from buffer") //! .iter().enumerate().for_each(|(i, x)| println!("Index: {} equals: {}", i, *x)); //! ``` //#![deny(missing_docs)] pub extern crate vulkano; pub extern crate vulkano_shaders; #[macro_use] mod cryo; pub use cryo::*;