Trait glin::attributes::VertexFormat[][src]

pub trait VertexFormat {
    fn attributes_formats(bindings: &dyn Bindings) -> Vec<Format>;
}
[]

Implemented by vertex types to convert attribute bindings into attribute formats

This is usually automatically implemented by deriving the VertexFormat annotaion from the glin_proc crate as in:

#[macro_use] extern crate glin;

#[derive(VertexFormat)]
struct Vertex{
   position: [f32;4],
   color: [f32;4],
}

fn main(){}

Required methods

fn attributes_formats(bindings: &dyn Bindings) -> Vec<Format>[src]

Implementors

impl VertexFormat for Vertex

impl VertexFormat for Vertex2D

impl VertexFormat for Vertex3D

impl VertexFormat for Vertex2DTex

impl VertexFormat for Vertex2DTex3D

impl VertexFormat for Vertex2DColor

impl VertexFormat for Vertex2DTexColor

impl VertexFormat for Vertex3DTex

impl VertexFormat for Vertex3DColor

impl VertexFormat for Vertex3DTexNormal

impl VertexFormat for Vertex3DNormal

impl VertexFormat for Vertex3DColorNormal

impl VertexFormat for Vertex3DTexColor