use ProgramCreationInput

This commit is contained in:
griffi-gh 2023-05-21 12:32:06 +02:00
parent 356455a15e
commit 2dfc915d41

View file

@ -1,14 +1,18 @@
macro_rules! include_shader_prefab {
($name: literal, $vert: literal, $frag: literal, $facade: expr) => {
{
use ::glium::Program;
use ::glium::{Program, program::ProgramCreationInput};
log::info!("compiling shader {}", $name);
Program::from_source(
&*$facade,
include_str!($vert),
include_str!($frag),
None,
).expect("Failed to compile gpu program")
Program::new(&*$facade, ProgramCreationInput::SourceCode {
vertex_shader: include_str!($vert),
fragment_shader: include_str!($frag),
geometry_shader: None,
tessellation_control_shader: None,
tessellation_evaluation_shader: None,
transform_feedback_varyings: None,
outputs_srgb: false,
uses_point_size: false,
}).expect("Failed to compile gpu program")
}
};
}