Methods Gl::buffer_data and Gl::sub_buffer_data pass slices of arbitrary T values to the GL system, but those Ts may have padding, which is uninitialised, which means we are passing uninitialised data to the GL system that may be read back by Rust later. The T type parameter should be constrained by some sort of unsafe trait to prevent that.
Methods
Gl::buffer_data
andGl::sub_buffer_data
pass slices of arbitraryT
values to the GL system, but thoseT
s may have padding, which is uninitialised, which means we are passing uninitialised data to the GL system that may be read back by Rust later. TheT
type parameter should be constrained by some sort of unsafe trait to prevent that.