summaryrefslogtreecommitdiff
path: root/opengl-bindings/src/framebuffer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'opengl-bindings/src/framebuffer.rs')
-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.
///