Struct glin::Vao[][src]

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 BufferObject.

Methods

impl Vao
[src]

Returns the number of vertices of the VAO

Calculated as the max len of all the underlying vertex buffers

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 the full range of the Vao vertices

Used to draw the full VAO through a Context

Consumes the Vao into a range

Consumes the VAO into it's full range

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 for Vao
[src]

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

This method tests for !=.

impl Eq for Vao
[src]

Auto Trait Implementations

impl !Send for Vao

impl !Sync for Vao