bevy/crates/bevy_render/src/vertex.rs
Carter Anderson 6eea96366d cargo fmt
2020-06-03 20:08:20 -07:00

18 lines
389 B
Rust

use bevy_core::bytes::Byteable;
use bevy_derive::Uniforms;
#[repr(C)]
#[derive(Clone, Copy, Uniforms)]
#[module(bevy_render = "crate")]
pub struct Vertex {
#[uniform(vertex)]
pub position: [f32; 3],
#[uniform(vertex)]
pub normal: [f32; 3],
#[uniform(vertex)]
pub uv: [f32; 2],
}
// SAFE: Vertex is repr(C) containing primitives
unsafe impl Byteable for Vertex {}