tobbebex / GPipe-Core

Core library of new GPipe, encapsulating OpenGl and providing a type safe minimal library
158 stars 30 forks source link

Add resizeBuffer #76

Closed sorki closed 1 year ago

sorki commented 3 years ago

For scenarios where input can change over time, this adds resizeBuffer function to produce a new buffer with specified length.

This causes transparent reallocation of OpenGL buffer, producing new empty buffer of right size.

sorki commented 3 years ago

Thinking about this, it's not ideal fit for this library since it voids the type-safetiness goal.

Would you accept this if renamed to unsafeResizeBuffer?

Or alternatively, I can carry this downstream but that requires re-exporting couple of internals:

tobbebex commented 1 year ago

Closing this old PR since its not safe indeed