Struct rin::gl::buffer::Builder [−][src]
pub struct Builder<'a>(_);
Implementations
impl<'a> Builder<'a>
[src]
impl<'a> Builder<'a>
[src]pub fn create<T>(&self, len: usize, usage: u32) -> Result<Buffer<T>, Error>
[src]
Creates a new buffer and allocates it with enough capacity to hold len
elements of type T
equivalent to glGenBuffers/glCreateBuffers + gl(Named)BufferData
pub fn create_target<T>(
&self,
len: usize,
usage: u32,
target: u32
) -> Result<Buffer<T>, Error>
[src]
&self,
len: usize,
usage: u32,
target: u32
) -> Result<Buffer<T>, Error>
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<Buffer<T>, Error>
[src]
Creates an empty buffer
Call load after empty to actually allocate the buffer with enough capacity
equivalent to glGenBuffers/glCreateBuffers
pub fn empty_target<T>(&self, target: u32) -> Result<Buffer<T>, Error>
[src]
Creates an empty buffer
Call load after empty to actually allocate the buffer with enough capacity
equivalent to glGenBuffers/glCreateBuffers
pub fn from_data<T>(&self, data: &[T], usage: u32) -> Result<Buffer<T>, Error> where
T: 'static,
[src]
T: 'static,
Creates a buffer, allocates it and loads the data passed as parameter in it
equivalent to glGenBuffers/glCreateBuffers + gl(Named)BufferData
pub fn from_data_target<T>(
&self,
data: &[T],
usage: u32,
target: u32
) -> Result<Buffer<T>, Error> where
T: 'static,
[src]
&self,
data: &[T],
usage: u32,
target: u32
) -> Result<Buffer<T>, Error> where
T: 'static,
Creates a buffer, allocates it and loads the data passed as parameter in it
equivalent to glGenBuffers/glCreateBuffers + gl(Named)BufferData
pub fn create_immutable<T>(
&self,
len: usize,
flags: u32
) -> Result<BufferStorage<T>, Error>
[src]
&self,
len: usize,
flags: u32
) -> Result<BufferStorage<T>, Error>
Allocates a buffer with enough capacity to hold len elemnts of type T
see gl(Named)BufferStorage
pub fn create_immutable_target<T>(
&self,
len: usize,
flags: u32,
target: u32
) -> Result<BufferStorage<T>, Error>
[src]
&self,
len: usize,
flags: u32,
target: u32
) -> Result<BufferStorage<T>, Error>
Allocates a buffer with enough capacity to hold len elemnts of type T
see gl(Named)BufferStorage
pub fn immutable_from_data<T>(
&self,
data: &[T],
flags: u32
) -> Result<BufferStorage<T>, Error>
[src]
&self,
data: &[T],
flags: u32
) -> Result<BufferStorage<T>, Error>
Allocates a buffer and loads the passed data in it
see gl(Named)BufferStorage
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Builder<'a>
impl<'a> !Send for Builder<'a>
impl<'a> !Sync for Builder<'a>
impl<'a> Unpin for Builder<'a>
impl<'a> !UnwindSafe for Builder<'a>
Blanket Implementations
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]