Skip to content

Commit

Permalink
Fix mac compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
not-fl3 committed May 26, 2024
1 parent 246cbfc commit cc998e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,13 +787,15 @@ impl Texture2D {
}

/// Updates this texture from the screen.
#[allow(unreachable_patterns)]
pub fn grab_screen(&self) {
use miniquad::*;
let texture = self.raw_miniquad_id();
let ctx = get_quad_context();
let params = ctx.texture_params(texture);
let raw_id = match unsafe { ctx.texture_raw_id(texture) } {
miniquad::RawId::OpenGl(id) => id,
_ => unimplemented!(),
};
let internal_format = match params.format {
TextureFormat::RGB8 => miniquad::gl::GL_RGB,
Expand Down

0 comments on commit cc998e6

Please sign in to comment.