2022-11-22 17:56:39 +11:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2022-11-26 18:38:15 +11:00
|
|
|
#![feature(let_chains)]
|
2022-11-22 17:56:39 +11:00
|
|
|
|
2022-12-01 09:59:55 +11:00
|
|
|
#[cfg(test)]
|
|
|
|
mod hello_triangle;
|
2022-11-22 17:56:39 +11:00
|
|
|
|
2022-12-01 11:05:12 +11:00
|
|
|
pub mod error;
|
2022-12-01 09:59:55 +11:00
|
|
|
mod filter_chain;
|
2022-11-26 18:38:15 +11:00
|
|
|
mod filter_pass;
|
2022-11-30 17:38:05 +11:00
|
|
|
mod framebuffer;
|
2022-12-01 11:05:12 +11:00
|
|
|
pub mod options;
|
2022-11-30 17:38:05 +11:00
|
|
|
mod quad_render;
|
|
|
|
mod render_target;
|
|
|
|
mod samplers;
|
2022-11-26 18:38:15 +11:00
|
|
|
mod texture;
|
2022-11-24 17:37:16 +11:00
|
|
|
mod util;
|
2022-12-01 11:05:12 +11:00
|
|
|
mod viewport;
|
2022-12-01 14:50:57 +11:00
|
|
|
mod parameters;
|
2022-11-07 16:25:11 +11:00
|
|
|
|
2022-12-04 10:32:10 +11:00
|
|
|
pub use filter_chain::FilterChainD3D11;
|
2022-12-01 11:10:04 +11:00
|
|
|
pub use viewport::Viewport;
|
|
|
|
pub use texture::DxImageView;
|
|
|
|
|
2022-11-07 16:25:11 +11:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
#[test]
|
2022-11-27 07:58:26 +11:00
|
|
|
fn triangle_d3d11() {
|
2022-11-30 17:38:05 +11:00
|
|
|
let sample = hello_triangle::d3d11_hello_triangle::Sample::new(
|
2022-12-01 14:50:57 +11:00
|
|
|
"../test/slang-shaders/border/gameboy-player/gameboy-player-crt-royale.slangp",
|
2022-12-01 11:05:12 +11:00
|
|
|
None,
|
2022-11-30 17:38:05 +11:00
|
|
|
)
|
|
|
|
.unwrap();
|
2022-12-01 11:05:12 +11:00
|
|
|
// let sample = hello_triangle::d3d11_hello_triangle::Sample::new(
|
|
|
|
// "../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp",
|
|
|
|
// Some(&FilterChainOptions {
|
|
|
|
// use_deferred_context: true,
|
|
|
|
// })
|
|
|
|
// )
|
|
|
|
// .unwrap();
|
2022-11-30 17:35:20 +11:00
|
|
|
|
2022-11-29 16:39:15 +11:00
|
|
|
// let sample = hello_triangle::d3d11_hello_triangle::Sample::new("../test/basic.slangp").unwrap();
|
2022-11-29 13:00:54 +11:00
|
|
|
|
2022-11-26 18:38:15 +11:00
|
|
|
hello_triangle::main(sample).unwrap();
|
2022-11-07 16:25:11 +11:00
|
|
|
}
|
|
|
|
}
|