From fe29489f7a23592a775206b5b368cc0397e7db13 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Sun, 21 May 2023 12:32:06 +0200 Subject: [PATCH] use ProgramCreationInput --- kubi/src/prefabs/shaders.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/kubi/src/prefabs/shaders.rs b/kubi/src/prefabs/shaders.rs index f2c792d..7496a2f 100644 --- a/kubi/src/prefabs/shaders.rs +++ b/kubi/src/prefabs/shaders.rs @@ -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") } }; }