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
(and in the corresponding manner for namedBufferData)
This allows passing slices using bufferData(target, T, slice.len, slice.ptr, usage), and allows creating uninitialized buffers using bufferData(target, T, length, null, usage).
This has the disadvantage that the API becomes less clear for the usual case. Another alternative would be to create a separate wrapper function for creating uninitialized buffers, but this seems cluttered to me.
The text was updated successfully, but these errors were encountered:
A null pointer can be used to create an uninitialized buffer, however zgl's wrappers do not support this.
I propose changing the signatures like this:
(and in the corresponding manner for
namedBufferData
)This allows passing slices using
bufferData(target, T, slice.len, slice.ptr, usage)
, and allows creating uninitialized buffers usingbufferData(target, T, length, null, usage)
.This has the disadvantage that the API becomes less clear for the usual case. Another alternative would be to create a separate wrapper function for creating uninitialized buffers, but this seems cluttered to me.
The text was updated successfully, but these errors were encountered: