Struct glitter::buffer::Buffer
[−]
[src]
pub struct Buffer { /* fields omitted */ }
An OpenGL buffer object.
In OpenGL, a buffer is essentially untyped, and what data it can contain only depends on how it is used. A buffer can be used to store vertices, indices, or essentially any other data that the graphics device needs to process.
A buffer will automatically be deleted after going out of scope.
See also
gl.gen_buffer
-
Create a new, empty buffer.
VertexBuffer
and IndexBuffer
: Wrapper types over raw buffers
that are more suitable for buffering vertex and index data, respectively.
gl.bind_array_buffer
:
and gl.bind_element_array_buffer
:
Bind a buffer to a target, returning a buffer binding type.
Trait Implementations
impl Drop for Buffer
[src]
impl GLObject for Buffer
[src]
type Id = GLuint
The type of the object's internal ID.
unsafe fn from_raw(id: Self::Id) -> Self
[src]
Get a new object from an OpenGL ID. Read more
fn id(&self) -> Self::Id
[src]
Get the object's ID.
fn into_raw(self) -> Self::Id where
Self: Sized,
[src]
Self: Sized,
Consume the object without cleaning up its resources, returning the object's ID. Read more