Struct glin::buffer::SharedBuilder [−][src]
pub struct SharedBuilder<'a>(_);
Implementations
impl<'a> SharedBuilder<'a>
[src]
impl<'a> SharedBuilder<'a>
[src]pub fn create<T>(&self, len: usize, usage: GLenum) -> Result<SharedBuffer<T>>
[src]
pub fn create_target<T>(
&self,
len: usize,
usage: GLenum,
target: GLenum
) -> Result<SharedBuffer<T>>
[src]
&self,
len: usize,
usage: GLenum,
target: GLenum
) -> Result<SharedBuffer<T>>
Creates a new buffer and allocates it with enough capacity to hold len
elements of type T
equivalent to glGenBuffers/glCreateBuffers + gl(Named)BufferData. target specifies the target to which to bind the buffer before creation. This is only useful with no DSA where in certain platforms you can’t change the target initially bound
pub fn empty<T>(&self) -> Result<SharedBuffer<T>>
[src]
pub fn empty_target<T>(&self, target: GLenum) -> Result<SharedBuffer<T>>
[src]
pub fn from_data<T: 'static>(
&self,
data: &[T],
usage: GLenum
) -> Result<SharedBuffer<T>>
[src]
&self,
data: &[T],
usage: GLenum
) -> Result<SharedBuffer<T>>
pub fn from_data_target<T: 'static>(
&self,
data: &[T],
usage: GLenum,
target: GLenum
) -> Result<SharedBuffer<T>>
[src]
&self,
data: &[T],
usage: GLenum,
target: GLenum
) -> Result<SharedBuffer<T>>
pub fn create_immutable<T>(
&self,
len: usize,
flags: GLbitfield
) -> Result<SharedBufferStorage<T>> where
T: 'static,
[src]
&self,
len: usize,
flags: GLbitfield
) -> Result<SharedBufferStorage<T>> where
T: 'static,
pub fn create_immutable_target<T>(
&self,
len: usize,
flags: GLbitfield,
target: GLenum
) -> Result<SharedBufferStorage<T>> where
T: 'static,
[src]
&self,
len: usize,
flags: GLbitfield,
target: GLenum
) -> Result<SharedBufferStorage<T>> where
T: 'static,
pub fn immutable_from_data<T>(
&self,
data: &[T],
flags: GLbitfield
) -> Result<SharedBufferStorage<T>> where
T: 'static,
[src]
&self,
data: &[T],
flags: GLbitfield
) -> Result<SharedBufferStorage<T>> where
T: 'static,