You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Graphics trait takes only chunks, which is cumbersome if you have a list of triangles to render. There are some use cases, like doing experimental algorithms in scripting, which requires a simple way to feed the data to the back-end.
Both f64 and f32 precision would be nice.
The text was updated successfully, but these errors were encountered:
So currently the trait just takes a closure(Outer) as parameter which takes another closure as a parameter(Inner). Inner takes a slice of i32s, which is a chunk of the tri list. So taking the tri-list as chunks has a function signature like so:
fntri_list<F>(&mutself,draw_state:&DrawState,color:&[f32;4],f:F)whereF:FnMut(&mutFnMut(&[f32]));// │ └ Inner Closure, each call to it consumes a new chunk of the tri list// └ Outer closure, takes inner as a parameter
So what would the function signature look like in what you're describing above?
Or are you thinking something more like having a tri-list data type that can be passed around that wraps either a reference to the closure a closure that returns chunks of the tri-list?
The
Graphics
trait takes only chunks, which is cumbersome if you have a list of triangles to render. There are some use cases, like doing experimental algorithms in scripting, which requires a simple way to feed the data to the back-end.Both
f64
andf32
precision would be nice.The text was updated successfully, but these errors were encountered: