draw_textured_triangles_2d

Function draw_textured_triangles_2d 

Source
pub fn draw_textured_triangles_2d(
    clip_rect: &Rectangle,
    handle: TextureHandle,
    indices: &[u32],
    positions: &[f32],
    colors: &[u8],
    uvs: &[f32],
)
Expand description

Draw colored 2D textured triangles in screen space (physical pixel coordinates).

  • colors - Assumes premultiplied alpha.

ยงErrors

Returns an crate::ErrorCode::InvalidArguments for the following reasons:

  • positions/uvs length is not an even multiple of 2.
  • indices length is not an even multiple of 3.
  • colors length is not an even multiple of 4.
  • handle is invalid