Struct gfx::device::handle::Buffer [] [src]

pub struct Buffer<R: Resources, T> {
    // some fields omitted
}

Type-safe buffer handle

Methods

impl<R: Resources, T> Buffer<R, T>
[src]

fn from_raw(handle: RawBuffer<R>) -> Buffer<R, T>

Create a type-safe Buffer from a RawBuffer

fn cast<U>(self) -> Buffer<R, U>

Cast the type this Buffer references

fn raw(&self) -> &RawBuffer<R>

Get the underlying raw Handle

fn get_info(&self) -> &BufferInfo

Get the associated information about the buffer

fn len(&self) -> usize

Get the number of elements in the buffer.

Fails if T is zero-sized.

Trait Implementations

impl<R: PartialEq + Resources, T: PartialEq> PartialEq for Buffer<R, T>
[src]

fn eq(&self, __arg_0: &Buffer<R, T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Buffer<R, T>) -> bool

This method tests for !=.

impl<R: Hash + Resources, T: Hash> Hash for Buffer<R, T>
[src]

fn hash<__HRT: Hasher>(&self, __arg_0: &mut __HRT)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl<R: Debug + Resources, T: Debug> Debug for Buffer<R, T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<R: Clone + Resources, T: Clone> Clone for Buffer<R, T>
[src]

fn clone(&self) -> Buffer<R, T>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<R: Resources> ToSlice<R> for Buffer<R, u8>
[src]

fn to_slice(&self, prim: PrimitiveType) -> Slice<R>

Get the slice of a type.

impl<R: Resources> ToSlice<R> for Buffer<R, u16>
[src]

fn to_slice(&self, prim: PrimitiveType) -> Slice<R>

Get the slice of a type.

impl<R: Resources> ToSlice<R> for Buffer<R, u32>
[src]

fn to_slice(&self, prim: PrimitiveType) -> Slice<R>

Get the slice of a type.

impl<R: Resources, T> Parameter<R> for Buffer<R, T>
[src]

fn check_block(_var: &BlockVar) -> bool

Check if this parameter is good for a given block.

fn put(&self, id: ParameterId, storage: &mut ParamStorage<R>)

Write into the parameter storage for rendering.

fn check_uniform(&UniformVar) -> bool

Check if this parameter is good for a given uniform.

fn check_texture(&SamplerVar) -> bool

Check if this parameter is good for a given texture.