mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-26 21:58:20 -06:00
use ProgramCreationInput
This commit is contained in:
parent
e42475570b
commit
fe29489f7a
|
@ -1,14 +1,18 @@
|
||||||
macro_rules! include_shader_prefab {
|
macro_rules! include_shader_prefab {
|
||||||
($name: literal, $vert: literal, $frag: literal, $facade: expr) => {
|
($name: literal, $vert: literal, $frag: literal, $facade: expr) => {
|
||||||
{
|
{
|
||||||
use ::glium::Program;
|
use ::glium::{Program, program::ProgramCreationInput};
|
||||||
log::info!("compiling shader {}", $name);
|
log::info!("compiling shader {}", $name);
|
||||||
Program::from_source(
|
Program::new(&*$facade, ProgramCreationInput::SourceCode {
|
||||||
&*$facade,
|
vertex_shader: include_str!($vert),
|
||||||
include_str!($vert),
|
fragment_shader: include_str!($frag),
|
||||||
include_str!($frag),
|
geometry_shader: None,
|
||||||
None,
|
tessellation_control_shader: None,
|
||||||
).expect("Failed to compile gpu program")
|
tessellation_evaluation_shader: None,
|
||||||
|
transform_feedback_varyings: None,
|
||||||
|
outputs_srgb: false,
|
||||||
|
uses_point_size: false,
|
||||||
|
}).expect("Failed to compile gpu program")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue