mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Fix wrong gamma in WebkitGTK (#888)
Closes https://github.com/emilk/egui/issues/794 Also refactor and improve VAO support detection Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ pub(crate) struct PostProcess {
|
||||
impl PostProcess {
|
||||
pub(crate) unsafe fn new(
|
||||
gl: &glow::Context,
|
||||
shader_prefix: &str,
|
||||
need_to_emulate_vao: bool,
|
||||
is_webgl_1: bool,
|
||||
width: i32,
|
||||
@@ -96,12 +97,20 @@ impl PostProcess {
|
||||
let vert_shader = compile_shader(
|
||||
gl,
|
||||
glow::VERTEX_SHADER,
|
||||
include_str!("shader/post_vertex_100es.glsl"),
|
||||
&format!(
|
||||
"{}\n{}",
|
||||
shader_prefix,
|
||||
include_str!("shader/post_vertex_100es.glsl")
|
||||
),
|
||||
)?;
|
||||
let frag_shader = compile_shader(
|
||||
gl,
|
||||
glow::FRAGMENT_SHADER,
|
||||
include_str!("shader/post_fragment_100es.glsl"),
|
||||
&format!(
|
||||
"{}\n{}",
|
||||
shader_prefix,
|
||||
include_str!("shader/post_fragment_100es.glsl")
|
||||
),
|
||||
)?;
|
||||
let program = link_program(gl, [vert_shader, frag_shader].iter())?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user