summaryrefslogtreecommitdiff
path: root/opengl-bindings/src/texture.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-09-14 12:41:52 +0200
committerHampusM <hampus@hampusmat.com>2026-09-14 12:41:52 +0200
commita0a7516b51c088ce416714eace3ad320ec04a5fb (patch)
tree37336d6dcf78952ae2840442d8ba4e7b7fcd45e5 /opengl-bindings/src/texture.rs
parenta8f7f5d12ea47175dfb361f9b3e7aa9520985d5c (diff)
feat(opengl-bindings): add tracing instrumentation to fns
Diffstat (limited to 'opengl-bindings/src/texture.rs')
-rw-r--r--opengl-bindings/src/texture.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/opengl-bindings/src/texture.rs b/opengl-bindings/src/texture.rs
index ebfc8f4..e0bd19f 100644
--- a/opengl-bindings/src/texture.rs
+++ b/opengl-bindings/src/texture.rs
@@ -22,6 +22,7 @@ impl Builder
self
}
+ #[tracing::instrument(skip(current_context, image))]
#[must_use]
pub fn create_2d<'image>(
&self,
@@ -60,6 +61,7 @@ impl Builder
Ok(texture)
}
+ #[tracing::instrument(skip(current_context, images))]
#[must_use]
pub fn create_cube_map<'image>(
&self,
@@ -125,6 +127,7 @@ impl Texture
Builder::default()
}
+ #[tracing::instrument(skip(current_context))]
pub fn bind_to_texture_unit(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -138,6 +141,7 @@ impl Texture
}
}
+ #[tracing::instrument(skip(current_context))]
pub fn generate_mipmap(&self, current_context: &MaybeCurrentContextWithFns)
{
unsafe {
@@ -145,6 +149,7 @@ impl Texture
}
}
+ #[tracing::instrument(skip_all)]
pub fn store_image_2d(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -176,6 +181,7 @@ impl Texture
Ok(())
}
+ #[tracing::instrument(skip_all)]
pub fn store_image_3d(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -203,6 +209,7 @@ impl Texture
Ok(())
}
+ #[tracing::instrument(skip_all, fields(wrapping = ?wrapping))]
pub fn set_wrap(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -224,6 +231,7 @@ impl Texture
}
}
+ #[tracing::instrument(skip(current_context))]
pub fn set_magnifying_filter(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -239,6 +247,7 @@ impl Texture
}
}
+ #[tracing::instrument(skip(current_context))]
pub fn set_minifying_filter(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -263,6 +272,7 @@ impl Texture
/// The values are stored unmodified as floating-point values.
///
/// The initial values are (0.0, 0.0, 0.0, 0.0).
+ #[tracing::instrument(skip(current_context))]
pub fn set_float_border_values(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -278,6 +288,7 @@ impl Texture
}
}
+ #[tracing::instrument(skip(current_context))]
pub fn delete(self, current_context: &MaybeCurrentContextWithFns)
{
unsafe {
@@ -297,6 +308,7 @@ impl Texture
self.texture
}
+ #[tracing::instrument(skip(current_context))]
fn new(
current_context: &MaybeCurrentContextWithFns,
target: crate::sys::types::GLenum,
@@ -313,6 +325,7 @@ impl Texture
Self { texture }
}
+ #[tracing::instrument(skip(current_context))]
fn alloc_2d(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -332,6 +345,7 @@ impl Texture
}
}
+ #[tracing::instrument(skip(current_context, image))]
fn sub_image_2d(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -371,6 +385,7 @@ impl Texture
}
}
+ #[tracing::instrument(skip(current_context, image))]
fn sub_image_3d(
&self,
current_context: &MaybeCurrentContextWithFns,
@@ -657,6 +672,7 @@ fn check_image_buffer_len_correct_for_size(
Ok(())
}
+#[tracing::instrument(skip(current_context))]
fn set_pixel_unpack_alignment(
current_context: &MaybeCurrentContextWithFns,
alignment: PixelAlignment,