Skip to content

Commit

Permalink
fixup: Use more general clear_depth that will also work on GLES (#320)
Browse files Browse the repository at this point in the history
* use generic clear_depth

Signed-off-by: sagudev <[email protected]>

* glow 0.15

Signed-off-by: sagudev <[email protected]>

---------

Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev authored Oct 16, 2024
1 parent 7a2918d commit e0c34af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ euclid = "0.22"
fnv = { version = "1.0", optional = true }
libc = "0.2"
log = "0.4"
glow = { version = "0.14.2", optional = true }
glow = { version = "0.15", optional = true }
osmesa-sys = { version = "0.1", optional = true }
rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = ["std"], optional = true }
rwh_06 = { package = "raw-window-handle", version = "0.6.2", features = ["std"], optional = true }
Expand Down
4 changes: 2 additions & 2 deletions src/chains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ impl<Device: DeviceAPI> SwapChainData<Device> {
unsafe {
gl.bind_framebuffer(gl::FRAMEBUFFER, fbo);
gl.clear_color(color[0], color[1], color[2], color[3]);
gl.clear_depth_f64(1.);
gl.clear_depth(1.);
gl.clear_stencil(0);
gl.disable(gl::SCISSOR_TEST);
gl.disable(gl::RASTERIZER_DISCARD);
Expand Down Expand Up @@ -435,7 +435,7 @@ impl<Device: DeviceAPI> SwapChainData<Device> {
clear_color[3],
);
gl.color_mask(color_mask[0], color_mask[1], color_mask[2], color_mask[3]);
gl.clear_depth_f64(clear_depth[0] as f64);
gl.clear_depth(clear_depth[0] as f64);
gl.clear_stencil(clear_stencil[0]);
gl.depth_mask(depth_mask);
gl.stencil_mask(stencil_mask[0] as _);
Expand Down

0 comments on commit e0c34af

Please sign in to comment.