Skip to main content

create_quad

Function create_quad 

Source
pub fn create_quad(width: f32, height: f32) -> Result<MeshData>
Expand description

Create a centered quad (2 triangles, 4 vertices) with top-origin image UVs.

UV V=0 is the source-image top and world +Y is the quad top. For image/video viewing, pass the pixel dimensions (e.g. 1920, 1080).

width and height must be finite and positive.

Donor: oa::FnMesh::createQuad.

ยงErrors

Returns an error for non-finite or non-positive dimensions.