Struct rin::gl::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: u32
) -> Result<SharedBuffer<T>, Error>
[src]
&self,
len: usize,
usage: u32
) -> Result<SharedBuffer<T>, Error>
pub fn create_target<T>(
&self,
len: usize,
usage: u32,
target: u32
) -> Result<SharedBuffer<T>, Error>
[src]
&self,
len: usize,
usage: u32,
target: u32
) -> Result<SharedBuffer<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<SharedBuffer<T>, Error>
[src]
pub fn empty_target<T>(&self, target: u32) -> Result<SharedBuffer<T>, Error>
[src]
pub fn from_data<T>(
&self,
data: &[T],
usage: u32
) -> Result<SharedBuffer<T>, Error> where
T: 'static,
[src]
&self,
data: &[T],
usage: u32
) -> Result<SharedBuffer<T>, Error> where
T: 'static,
pub fn from_data_target<T>(
&self,
data: &[T],
usage: u32,
target: u32
) -> Result<SharedBuffer<T>, Error> where
T: 'static,
[src]
&self,
data: &[T],
usage: u32,
target: u32
) -> Result<SharedBuffer<T>, Error> where
T: 'static,
pub fn create_immutable<T>(
&self,
len: usize,
flags: u32
) -> Result<SharedBufferStorage<T>, Error> where
T: 'static,
[src]
&self,
len: usize,
flags: u32
) -> Result<SharedBufferStorage<T>, Error> where
T: 'static,
pub fn create_immutable_target<T>(
&self,
len: usize,
flags: u32,
target: u32
) -> Result<SharedBufferStorage<T>, Error> where
T: 'static,
[src]
&self,
len: usize,
flags: u32,
target: u32
) -> Result<SharedBufferStorage<T>, Error> where
T: 'static,
pub fn immutable_from_data<T>(
&self,
data: &[T],
flags: u32
) -> Result<SharedBufferStorage<T>, Error> where
T: 'static,
[src]
&self,
data: &[T],
flags: u32
) -> Result<SharedBufferStorage<T>, Error> where
T: 'static,
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SharedBuilder<'a>
impl<'a> !Send for SharedBuilder<'a>
impl<'a> !Sync for SharedBuilder<'a>
impl<'a> Unpin for SharedBuilder<'a>
impl<'a> !UnwindSafe for SharedBuilder<'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]