2022-12-06 17:01:21 +11:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2022-12-06 17:38:21 +11:00
|
|
|
#![feature(let_chains)]
|
2022-12-06 13:01:15 +11:00
|
|
|
|
2022-12-22 13:39:31 +11:00
|
|
|
mod draw_quad;
|
|
|
|
mod error;
|
2022-12-06 17:01:21 +11:00
|
|
|
mod filter_chain;
|
|
|
|
mod filter_pass;
|
2022-12-07 18:05:10 +11:00
|
|
|
mod framebuffer;
|
2022-12-22 13:39:31 +11:00
|
|
|
mod hello_triangle;
|
|
|
|
mod luts;
|
2022-12-11 17:06:28 +11:00
|
|
|
mod renderpass;
|
2022-12-22 13:39:31 +11:00
|
|
|
mod util;
|
2022-12-11 17:06:28 +11:00
|
|
|
mod vulkan_primitives;
|
2022-12-22 13:39:31 +11:00
|
|
|
mod vulkan_state;
|
2022-12-22 14:03:38 +11:00
|
|
|
mod samplers;
|
2022-12-06 13:01:15 +11:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use super::*;
|
2022-12-22 13:39:31 +11:00
|
|
|
use crate::filter_chain::FilterChainVulkan;
|
2022-12-06 13:01:15 +11:00
|
|
|
#[test]
|
|
|
|
fn triangle_vk() {
|
2022-12-10 17:25:36 +11:00
|
|
|
let base = hello_triangle::ExampleBase::new(900, 600);
|
2022-12-22 13:13:35 +11:00
|
|
|
// let mut filter = FilterChainVulkan::load_from_path(
|
|
|
|
// (base.device.clone(), base.present_queue.clone(), base.device_memory_properties.clone()),
|
|
|
|
// "../test/slang-shaders/border/gameboy-player/gameboy-player-crt-royale.slangp",
|
|
|
|
// None
|
|
|
|
// )
|
|
|
|
|
2022-12-10 17:25:36 +11:00
|
|
|
let mut filter = FilterChainVulkan::load_from_path(
|
2022-12-22 13:39:31 +11:00
|
|
|
(
|
|
|
|
base.device.clone(),
|
|
|
|
base.present_queue.clone(),
|
|
|
|
base.device_memory_properties.clone(),
|
|
|
|
),
|
2022-12-10 17:25:36 +11:00
|
|
|
"../test/slang-shaders/border/gameboy-player/gameboy-player-crt-royale.slangp",
|
2022-12-22 13:39:31 +11:00
|
|
|
None,
|
2022-12-10 17:25:36 +11:00
|
|
|
)
|
2022-12-22 13:13:35 +11:00
|
|
|
// FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
|
2022-12-22 13:39:31 +11:00
|
|
|
.unwrap();
|
2022-12-10 17:25:36 +11:00
|
|
|
hello_triangle::main(base);
|
2022-12-06 13:01:15 +11:00
|
|
|
}
|
|
|
|
}
|