[][src]Struct glin::Vao

pub struct Vao { /* fields omitted */ }

A wrapper for an OpenGL VAO

VAO Uses the DSA model for creating vertex array objects and binding attributes to it.

Internally it uses the types in the attributes module to bind buffers to the different attributes.

VAO binds buffers to vertex buffer binding points using VertexBufferBindingT and allows to specify a divisor for each of those bindings.

Then binds attributes by their location and format to one of the previously specified binding points

This allows to specify a relation 1:N 1:N between buffers -> binding points <- attributes

Where a buffer can be bound to 1 or more binding points and one or more attributes can read from one binding point. See the attributes module for more specifics about how this is implemented

A VAO can also optionally include an indices buffer.

A VAO takes ownership of the buffers it binds to binding points. In order to bind a buffer in several VAO you can use a SharedBuffer or a reference to a Buffer.

Methods

impl Vao
[src]

Returns the number of vertices of the VAO

Calculated as the max len of all the underlying vertex buffers

Returns true all the internal vertex buffers are empty

Returns a Range which specifies a range of vertices and a drawing mode

Used to draw a portion of a VAO through a Context

Returns a Range which specifies a range of vertices and a drawing mode

Used to draw a portion of a VAO through a Context base_vertex adds an offset to the indices See glDrawElementsBaseVertex

Returns a Range which specifies a range of vertices and a drawing mode

Used to draw a portion of a VAO through a Context base_instance adds an offset to the instanced attributes index See glDrawArraysInstancedBaseInstance

Returns a Range which specifies a range of vertices and a drawing mode

Used to draw a portion of a VAO through a Context

  • base_vertex adds an offset to the indices
  • base_instance adds an offset to the instanced attributes index

See glDrawElementsBaseVertexBaseInstance

Returns the full range of the Vao vertices

Used to draw the full VAO through a Context

Returns the full range of the Vao vertices

Used to draw the full VAO through a Context base_vertex adds an offset to the indices See glDrawElementsBaseVertex

Returns the full range of the Vao vertices

Used to draw the full VAO through a Context base_instance adds an offset to the instanced attributes index See glDrawArraysInstancedBaseInstance

Returns the full range of the Vao vertices

Used to draw the full VAO through a Context

  • base_vertex adds an offset to the indices
  • base_instance adds an offset to the instanced attributes index

See glDrawElementsBaseVertexBaseInstance

Consumes the Vao into a range

Consumes the Vao into a range

base_vertex adds an offset to the indices See glDrawElementsBaseVertex

Consumes the Vao into a range

base_instance adds an offset to the instanced attributes index See glDrawArraysInstancedBaseInstance

Consumes the Vao into a range

  • base_vertex adds an offset to the indices
  • base_instance adds an offset to the instanced attributes index

See glDrawElementsBaseVertexBaseInstance

Consumes the VAO into it's full range

Consumes the VAO into it's full range

base_vertex adds an offset to the indices See glDrawElementsBaseVertex

Consumes the VAO into it's full range

base_instance adds an offset to the instanced attributes index See glDrawArraysInstancedBaseInstance

Consumes the VAO into it's full range

  • base_vertex adds an offset to the indices
  • base_instance adds an offset to the instanced attributes index

See glDrawElementsBaseVertexBaseInstance

Enable an attribute by name

Disable an attribute by name

Enable the indices in the VAO

Disable the indices in the VAO

Reference to an internal buffer by it's index and type

Mutable reference to an internal buffer by it's index and type

Reference to the indices buffer by it's index and type

Mutable reference to the indices buffer by it's index and type

Trait Implementations

impl<'a> VaoRange for &'a Vao
[src]

impl PartialEq<Vao> for Vao
[src]

This method tests for !=.

impl Eq for Vao
[src]

impl Drop for Vao
[src]

impl Debug for Vao
[src]

Auto Trait Implementations

impl !Send for Vao

impl !Sync for Vao

Blanket Implementations

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

impl<T> From for T
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> SetParameter for T
[src]

Sets value as a parameter of self.