Skip to main content

make_vertex_buffer

Function make_vertex_buffer 

pub fn make_vertex_buffer(
    context: &mut RCHandle<GrDirectContext>,
    data: &[u8],
) -> Option<RCHandle<SkMesh_VertexBuffer>>
Expand description

Makes a GPU-backed vertex buffer to be used with crate::Meshes.

  • context The data will be uploaded to the corresponding GPU and the returned buffer will only be compatible with surfaces using the same context.
  • data The data used to populate the buffer. Its length is both the size of the data and the size of the resulting buffer.