GPipe-Core
GPipe-Core copied to clipboard
Add resizeBuffer
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.
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:
-
bufName
,bufElementSize
fromGraphics.GPipe(.Internal).Buffer
-
liftNonWinContextIO
fromGraphics.GPipe(.Internal).Context
.
Closing this old PR since its not safe indeed