-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
By implementing
impl<T1, T2> Add<T1> for Ref<T2>
where T2: Add<T1>
// and
impl<T> Add<Ref<T>> for vec<N, L>
where vec<N, L>: Add<T>
// and similarly for sm::Struct<S>, u32, i32, f32 and so onfor all binary operations, we can massively improve the ergonomics of using Ref.
Would you be open for that?
I implemented it already so I could prepare a PR very quickly.
Also, there is a lot of functions/methods in shame that accept impl To<T> and it would be nice if those accepted Ref<T>. For testing purposes I implemented ToGpuType for Ref<T> which implies impl To<T> for Ref<T> and it works great, but of course that's not the intended way for ToGpuType to be used.
With those two improvements I think Buffer could safely be removed in favor of renaming BufferRef to Buffer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels