Disable Magpie glium gamma-correction
This commit is contained in:
parent
25532f4f9e
commit
e924a17073
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
use canary::{DrawCommand, Vec2, PX_PER_MM};
|
||||
use glium::Surface;
|
||||
use glium::{program::ProgramCreationInput, Surface};
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Vertex {
|
||||
|
@ -59,9 +59,21 @@ pub struct Graphics {
|
|||
|
||||
impl Graphics {
|
||||
pub fn new(display: glium::Display) -> Self {
|
||||
let program =
|
||||
glium::Program::from_source(&display, VERTEX_SHADER_SRC, FRAGMENT_SHADER_SRC, None)
|
||||
.unwrap();
|
||||
let program = glium::Program::new(
|
||||
&display,
|
||||
ProgramCreationInput::SourceCode {
|
||||
vertex_shader: VERTEX_SHADER_SRC,
|
||||
tessellation_control_shader: None,
|
||||
tessellation_evaluation_shader: None,
|
||||
geometry_shader: None,
|
||||
fragment_shader: FRAGMENT_SHADER_SRC,
|
||||
transform_feedback_varyings: None,
|
||||
outputs_srgb: true, // don't automatically apply gamma correction
|
||||
uses_point_size: false,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
Self { display, program }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue