From 9a442786c45ce05b4dc42cb07b654eac7671b35d Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 20 Mar 2026 14:02:32 +0100 Subject: feat(opengl-bindings): add Buffer bind_to_indexed_target fn --- opengl-bindings/src/buffer.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'opengl-bindings/src') diff --git a/opengl-bindings/src/buffer.rs b/opengl-bindings/src/buffer.rs index 66ab719..7d79d10 100644 --- a/opengl-bindings/src/buffer.rs +++ b/opengl-bindings/src/buffer.rs @@ -194,6 +194,22 @@ impl Buffer } } + pub fn bind_to_indexed_target( + &self, + current_context: &CurrentContextWithFns<'_>, + target: BindingTarget, + index: u32, + ) + { + unsafe { + current_context.fns().BindBufferBase( + target as crate::sys::types::GLenum, + index, + self.buf, + ); + } + } + pub(crate) fn object(&self) -> crate::sys::types::GLuint { self.buf -- cgit v1.2.3-18-g5258