Skip to content

Commit

Permalink
use generic clear_depth
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev committed Oct 16, 2024
1 parent 7a2918d commit 43c8428
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ 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.14.2", optional = true }
glow = { git = "https://github.com/grovesNL/glow", 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 43c8428

Please sign in to comment.