summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-08-29 20:52:59 +0200
committerHampusM <hampus@hampusmat.com>2026-08-29 20:52:59 +0200
commit001559fb4da769ee19ee464a6edaebc8957697a6 (patch)
tree8d23eb000a1a739196d9e9838513f990c9ee0200
parent950c23cf296f39ca29b12cbfd59a58c5aaceccbe (diff)
feat(opengl-bindings): add Framebuffer::detach_texture fn
-rw-r--r--opengl-bindings/src/framebuffer.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/opengl-bindings/src/framebuffer.rs b/opengl-bindings/src/framebuffer.rs
index 9511f88..fb93b47 100644
--- a/opengl-bindings/src/framebuffer.rs
+++ b/opengl-bindings/src/framebuffer.rs
@@ -40,6 +40,23 @@ impl Framebuffer
}
}
+ /// Detaches the texture object at the specified attachment point.
+ pub fn detach_texture(
+ &self,
+ current_context: &MaybeCurrentContextWithFns,
+ attachment: Attachment,
+ )
+ {
+ unsafe {
+ current_context.fns().NamedFramebufferTexture(
+ self.inner,
+ attachment.into_gl(),
+ 0,
+ 0,
+ );
+ }
+ }
+
/// Specifies which color buffer is to be drawn into when colors are written to this
/// framebuffer object.
///