From 001559fb4da769ee19ee464a6edaebc8957697a6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 29 Aug 2026 20:52:59 +0200 Subject: feat(opengl-bindings): add Framebuffer::detach_texture fn --- opengl-bindings/src/framebuffer.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'opengl-bindings') 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. /// -- cgit v1.2.3-18-g5258