stbvox_reset_buffers function
- @Native<Void Function(Pointer<
stbvox_mesh_maker> )>(ffi.Pointer<stbvox_mesh_maker>)>()
Returns the 'transform' data for the shader uniforms. It is your job to set this to the shader before drawing the mesh. It is the only uniform that needs to change per-mesh. Note that it is not a 3x3 matrix, but rather a scale to decode fixed point numbers as floats, a translate from relative to global space, and a special translation for texture coordinate generation that avoids floating-point precision issues. @TODO: currently we add the global translation to the vertex, than multiply by modelview, but this means if camera location and vertex are far from the origin, we lose precision. Need to make a special modelview with the translation (or some of it) factored out to avoid this.
Implementation
@ffi.Native<ffi.Void Function(ffi.Pointer<stbvox_mesh_maker>)>()
external void stbvox_reset_buffers(ffi.Pointer<stbvox_mesh_maker> mm);