render__draw_triangles_2d

Function render__draw_triangles_2d 

Source
pub unsafe extern "C" fn render__draw_triangles_2d(
    clip_rect_ptr: *const Rectangle,
    indices_ptr: *const u32,
    indices_len: u32,
    positions_ptr: *const f32,
    positions_len: u32,
    colors_ptr: *const u8,
    colors_len: u32,
) -> ErrorCode
Expand description

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

  • colors - Assumes premultiplied alpha.

ยงErrors

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

  • positions 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.