glow: move where FRAMEBUFFER_SRGB is enabled
This commit is contained in:
parent
d20be45c4c
commit
e369626d3d
3 changed files with 5 additions and 10 deletions
|
@ -109,10 +109,5 @@ fn create_display(
|
|||
|
||||
let gl = unsafe { glow::Context::from_loader_function(|s| gl_window.get_proc_address(s)) };
|
||||
|
||||
unsafe {
|
||||
use glow::HasContext as _;
|
||||
gl.enable(glow::FRAMEBUFFER_SRGB);
|
||||
}
|
||||
|
||||
(gl_window, gl)
|
||||
}
|
||||
|
|
|
@ -25,11 +25,6 @@ fn create_display(
|
|||
|
||||
let gl = unsafe { glow::Context::from_loader_function(|s| gl_window.get_proc_address(s)) };
|
||||
|
||||
unsafe {
|
||||
use glow::HasContext as _;
|
||||
gl.enable(glow::FRAMEBUFFER_SRGB);
|
||||
}
|
||||
|
||||
(gl_window, gl)
|
||||
}
|
||||
|
||||
|
|
|
@ -264,6 +264,11 @@ impl Painter {
|
|||
glow::ONE,
|
||||
);
|
||||
|
||||
if !cfg!(target_arch = "wasm32") {
|
||||
self.gl.enable(glow::FRAMEBUFFER_SRGB);
|
||||
check_for_gl_error(&self.gl, "FRAMEBUFFER_SRGB");
|
||||
}
|
||||
|
||||
let width_in_points = width_in_pixels as f32 / pixels_per_point;
|
||||
let height_in_points = height_in_pixels as f32 / pixels_per_point;
|
||||
|
||||
|
|
Loading…
Reference in a new issue