summaryrefslogtreecommitdiff
path: root/opengl-bindings/src/buffer.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-03-20 14:02:32 +0100
committerHampusM <hampus@hampusmat.com>2026-03-20 14:02:32 +0100
commit9a442786c45ce05b4dc42cb07b654eac7671b35d (patch)
tree17d7c1d621bd1ade338158fb47d73d1c16075a20 /opengl-bindings/src/buffer.rs
parenteca5ed3d7f6344eebbbf34cc10ef72c6a312fa43 (diff)
feat(opengl-bindings): add Buffer bind_to_indexed_target fn
Diffstat (limited to 'opengl-bindings/src/buffer.rs')
-rw-r--r--opengl-bindings/src/buffer.rs16
1 files changed, 16 insertions, 0 deletions
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<Item: ReprC> Buffer<Item>
}
}
+ 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