[][src]Function meshopt::ffi::meshopt_optimizeOverdraw

pub unsafe extern "C" fn meshopt_optimizeOverdraw(
    destination: *mut c_uint,
    indices: *const c_uint,
    index_count: usize,
    vertex_positions: *const f32,
    vertex_count: usize,
    vertex_positions_stride: usize,
    threshold: f32
)

Overdraw optimizer Reorders indices to reduce the number of GPU vertex shader invocations and the pixel overdraw If index buffer contains multiple ranges for multiple draw calls, this functions needs to be called on each range individually.

destination must contain enough space for the resulting index buffer (index_count elements) indices must contain index data that is the result of meshopt_optimizeVertexCache (not the original mesh indices!) vertex_positions should have float3 position in the first 12 bytes of each vertex - similar to glVertexPointer threshold indicates how much the overdraw optimizer can degrade vertex cache efficiency (1.05 = up to 5%) to reduce overdraw more efficiently