Skip to content

Commit e0c34af

Browse files
authored
fixup: Use more general clear_depth that will also work on GLES (servo#320)
* use generic clear_depth Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * glow 0.15 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
1 parent 7a2918d commit e0c34af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ euclid = "0.22"
3737
fnv = { version = "1.0", optional = true }
3838
libc = "0.2"
3939
log = "0.4"
40-
glow = { version = "0.14.2", optional = true }
40+
glow = { version = "0.15", optional = true }
4141
osmesa-sys = { version = "0.1", optional = true }
4242
rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = ["std"], optional = true }
4343
rwh_06 = { package = "raw-window-handle", version = "0.6.2", features = ["std"], optional = true }

src/chains.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl<Device: DeviceAPI> SwapChainData<Device> {
402402
unsafe {
403403
gl.bind_framebuffer(gl::FRAMEBUFFER, fbo);
404404
gl.clear_color(color[0], color[1], color[2], color[3]);
405-
gl.clear_depth_f64(1.);
405+
gl.clear_depth(1.);
406406
gl.clear_stencil(0);
407407
gl.disable(gl::SCISSOR_TEST);
408408
gl.disable(gl::RASTERIZER_DISCARD);
@@ -435,7 +435,7 @@ impl<Device: DeviceAPI> SwapChainData<Device> {
435435
clear_color[3],
436436
);
437437
gl.color_mask(color_mask[0], color_mask[1], color_mask[2], color_mask[3]);
438-
gl.clear_depth_f64(clear_depth[0] as f64);
438+
gl.clear_depth(clear_depth[0] as f64);
439439
gl.clear_stencil(clear_stencil[0]);
440440
gl.depth_mask(depth_mask);
441441
gl.stencil_mask(stencil_mask[0] as _);

0 commit comments

Comments
 (0)