GPipe-Core icon indicating copy to clipboard operation
GPipe-Core copied to clipboard

Add resizeBuffer

Open sorki opened this issue 4 years ago • 1 comments

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 avatar Nov 21 '20 14:11 sorki

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 from Graphics.GPipe(.Internal).Buffer
  • liftNonWinContextIO from Graphics.GPipe(.Internal).Context.

sorki avatar Mar 19 '21 08:03 sorki

Closing this old PR since its not safe indeed

tobbebex avatar Sep 12 '23 19:09 tobbebex