diff --git a/src/lib.rs b/src/lib.rs index d2d0318..5731332 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1900,7 +1900,7 @@ pub trait HasContext: __private::Sealed { unsafe fn bind_image_texture( &self, unit: u32, - texture: Self::Texture, + texture: Option, level: i32, layered: bool, layer: i32, diff --git a/src/native.rs b/src/native.rs index 4941f98..373bbd1 100644 --- a/src/native.rs +++ b/src/native.rs @@ -4342,7 +4342,7 @@ impl HasContext for Context { unsafe fn bind_image_texture( &self, unit: u32, - texture: Self::Texture, + texture: Option, level: i32, layered: bool, layer: i32, @@ -4352,7 +4352,7 @@ impl HasContext for Context { let gl = &self.raw; gl.BindImageTexture( unit, - texture.0.get(), + texture.map(|tex| tex.0.get()).unwrap_or(0), level, layered as u8, layer, diff --git a/src/web_sys.rs b/src/web_sys.rs index d819174..1d21c8d 100644 --- a/src/web_sys.rs +++ b/src/web_sys.rs @@ -6035,7 +6035,7 @@ impl HasContext for Context { unsafe fn bind_image_texture( &self, _unit: u32, - _texture: Self::Texture, + _texture: Option, _level: i32, _layered: bool, _layer: i32,