diff options
Diffstat (limited to 'opengl-bindings/src/buffer.rs')
| -rw-r--r-- | opengl-bindings/src/buffer.rs | 16 |
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 |
