Struct rin::gl::buffer::SharedBuilder[][src]

pub struct SharedBuilder<'a>(_);

Implementations

impl<'a> SharedBuilder<'a>[src]

pub fn create<T>(
    &self,
    len: usize,
    usage: u32
) -> Result<SharedBuffer<T>, Error>
[src]

pub fn create_target<T>(
    &self,
    len: usize,
    usage: u32,
    target: u32
) -> Result<SharedBuffer<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. 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]

pub fn from_data_target<T>(
    &self,
    data: &[T],
    usage: u32,
    target: u32
) -> Result<SharedBuffer<T>, Error> where
    T: 'static, 
[src]

pub fn create_immutable<T>(
    &self,
    len: usize,
    flags: u32
) -> Result<SharedBufferStorage<T>, Error> where
    T: 'static, 
[src]

pub fn create_immutable_target<T>(
    &self,
    len: usize,
    flags: u32,
    target: u32
) -> Result<SharedBufferStorage<T>, Error> where
    T: 'static, 
[src]

pub fn immutable_from_data<T>(
    &self,
    data: &[T],
    flags: u32
) -> Result<SharedBufferStorage<T>, Error> where
    T: 'static, 
[src]

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<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]