Skip to content

Commit

Permalink
disable scissor test in glow before clearing screen
Browse files Browse the repository at this point in the history
  • Loading branch information
coderedart committed Dec 25, 2023
1 parent 555240d commit b794c5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/egui_render_glow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "egui_render_glow"
description = "egui rendering backend using glow"
version.workspace = true
version = "0.6.1"
repository.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion crates/egui_render_glow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ impl GlowBackend {

pub fn prepare_frame(&mut self, _latest_framebuffer_size_getter: impl FnMut() -> [u32; 2]) {
unsafe {
self.glow_context.clear(glow::COLOR_BUFFER_BIT);
self.glow_context.disable(glow::SCISSOR_TEST);
self.glow_context
.clear(glow::COLOR_BUFFER_BIT | glow::DEPTH_BUFFER_BIT);
}
}

Expand Down
2 changes: 2 additions & 0 deletions examples/basic.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![windows_subsystem = "windows"] // to turn off console.

use egui::DragValue;
use egui_overlay::EguiOverlay;
#[cfg(not(target_os = "macos"))]
Expand Down

0 comments on commit b794c5b

Please sign in to comment.