summaryrefslogtreecommitdiff
path: root/opengl-bindings/src/texture.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-05-28 19:56:43 +0200
committerHampusM <hampus@hampusmat.com>2026-05-28 19:56:43 +0200
commit038aead236e77f41e6d229510a5e25741a6815c6 (patch)
treefe50c328568f656e3528bef56b550b6b836c7102 /opengl-bindings/src/texture.rs
parentaba4f418af2e514c78fe06a1c98949670eaeacd9 (diff)
refactor(opengl-bindings): remove CurrentContextWithFns
Diffstat (limited to 'opengl-bindings/src/texture.rs')
-rw-r--r--opengl-bindings/src/texture.rs18
1 files changed, 9 insertions, 9 deletions
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<u32>,
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<crate::sys::types::GLsizei>,