regl-project / regl

👑 Functional WebGL
MIT License
5.19k stars 320 forks source link

Expose `resize` method for regl-managed contexts #500

Open joepie91 opened 6 years ago

joepie91 commented 6 years ago

There's a resize method that gets called internally whenever the window resizes; however, it's not accessible from the consuming code.

Sometimes other factors can cause a container element to become resized, like when using a layout management library such as FlexLayout.

It would be greatly helpful if, at least for cases where regl manages the context and canvas, a resize method were exposed on the regl object (eg. as regl.forceResize), such that it's possible to manually force a resize operation when needed.

danman113 commented 3 years ago

Just going to bump this because I think it's a good idea

illus0r commented 2 years ago

There is a workaround described in #431