From 038aead236e77f41e6d229510a5e25741a6815c6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 28 May 2026 19:56:43 +0200 Subject: refactor(opengl-bindings): remove CurrentContextWithFns --- opengl-bindings/src/texture.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'opengl-bindings/src/texture.rs') diff --git a/opengl-bindings/src/texture.rs b/opengl-bindings/src/texture.rs index 391ae0e..e0035b6 100644 --- a/opengl-bindings/src/texture.rs +++ b/opengl-bindings/src/texture.rs @@ -1,5 +1,5 @@ use crate::data_types::Dimens; -use crate::CurrentContextWithFns; +use crate::MaybeCurrentContextWithFns; #[derive(Debug)] pub struct Texture @@ -10,7 +10,7 @@ pub struct Texture impl Texture { #[must_use] - pub fn new(current_context: &CurrentContextWithFns<'_>) -> Self + pub fn new(current_context: &MaybeCurrentContextWithFns) -> Self { let mut texture = crate::sys::types::GLuint::default(); @@ -27,7 +27,7 @@ impl Texture pub fn bind_to_texture_unit( &self, - current_context: &CurrentContextWithFns<'_>, + current_context: &MaybeCurrentContextWithFns, texture_unit: u32, ) { @@ -44,7 +44,7 @@ impl Texture /// Returns `Err` if any value in `size` does not fit into a `i32`. pub fn generate( &self, - current_context: &CurrentContextWithFns<'_>, + current_context: &MaybeCurrentContextWithFns, size: &Dimens, data: &[u8], pixel_data_format: PixelDataFormat, @@ -77,7 +77,7 @@ impl Texture pub fn set_wrap( &self, - current_context: &CurrentContextWithFns<'_>, + current_context: &MaybeCurrentContextWithFns, wrapping: Wrapping, ) { @@ -98,7 +98,7 @@ impl Texture pub fn set_magnifying_filter( &self, - current_context: &CurrentContextWithFns<'_>, + current_context: &MaybeCurrentContextWithFns, filtering: Filtering, ) { @@ -113,7 +113,7 @@ impl Texture pub fn set_minifying_filter( &self, - current_context: &CurrentContextWithFns<'_>, + current_context: &MaybeCurrentContextWithFns, filtering: Filtering, ) { @@ -126,7 +126,7 @@ impl Texture } } - pub fn delete(self, current_context: &CurrentContextWithFns<'_>) + pub fn delete(self, current_context: &MaybeCurrentContextWithFns) { unsafe { current_context @@ -147,7 +147,7 @@ impl Texture fn alloc_image( &self, - current_context: &CurrentContextWithFns<'_>, + current_context: &MaybeCurrentContextWithFns, pixel_data_format: PixelDataFormat, color_space: ColorSpace, size: &Dimens, -- cgit v1.2.3-18-g5258