rust3ds / citro3d-rs

Rust bindings and safe wrappers for citro3d
https://rust3ds.github.io/citro3d-rs
14 stars 11 forks source link

First draft of safe buffer info API #16

Closed ian-h-chamberlain closed 1 year ago

ian-h-chamberlain commented 1 year ago

Closes #14

There are a couple pieces here:

  1. Add some wrapper types around the global C3D_AttrInfo and C3D_BufferInfo
  2. Allow adding arbitrary slice data to the BufferInfo, returning a lifetime-bound handle to the original slice
  3. Require the VBO handle when drawing arrays (encodes the index, length, and lifetime of the vertex data).

Remaining stuff to do before merging:

ian-h-chamberlain commented 1 year ago

Haven't gotten much feedback so just gonna merge this, if anyone has more comments I can address them later.