pub fn draw_cube(position: Vec3, size: Vec3, _texture: Option<()>, color: Color)Expand description
Draws an axis-aligned resident cuboid.
Recently used size/color combinations reuse one resident mesh, so a steady scene neither allocates nor re-uploads geometry each frame. At most 64 combinations stay cached (oldest replaced first); continuously varying sizes still work, at the cost of a fresh mesh per new combination.
use ferravex_render::{draw_cube, vec3, WHITE};
draw_cube(vec3(0., 1., 0.), vec3(1., 2., 1.), None, WHITE);