diff --git a/src/lib.rs b/src/lib.rs index 2b1c286..da7e5fb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1855,7 +1855,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 967e311..8c75f48 100644 --- a/src/native.rs +++ b/src/native.rs @@ -4275,7 +4275,7 @@ impl HasContext for Context { unsafe fn bind_image_texture( &self, unit: u32, - texture: Self::Texture, + texture: Option, level: i32, layered: bool, layer: i32, @@ -4285,7 +4285,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 42c9cdf..912ed04 100644 --- a/src/web_sys.rs +++ b/src/web_sys.rs @@ -5980,7 +5980,7 @@ impl HasContext for Context { unsafe fn bind_image_texture( &self, _unit: u32, - _texture: Self::Texture, + _texture: Option, _level: i32, _layered: bool, _layer: i32,