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
For example, suppose we would like to render Three, Babylon, and Pixi objects into the same WebGL context, in the same 3D space.
It is currently very difficult to do this because each WebGL library manages state of the context in their own ways, and these private internals often change and break solutions that people come up with because there's no standard way to do it.
Maybe if the foundations for each library (Three, Babylon, Pixi, Two, etc) were built on Regl, we'd have a common way of rendering to a single context.
Regl makes an abstraction just on top of raw WebGL for managing WebGL state. It doesn't render for you all the things that Three.js can, it only provides the minimal foundation for working with raw WebGL in a stateful way that is easy to manage.
It seems that libraries like Three, Babylon, PlayCanvas, Pixi, Two, etc, could benefit from using a standardized way for managing WebGL state, which would make it easy to combine renderings from any of these libraries into the same WebGL context.
What are your thoughts on refactoring the foundation of various WebGL libraries like Three.js/Pixi to use Regl for managing WebGL state? Does Regl offer enough flexibility for libraries like Three.js/Pixi to do what they need to do on top of Regl?
The text was updated successfully, but these errors were encountered:
I think that would be up to the individual libraries and their maintainers. You could totally implement the WebGLRenderer for three.js in regl. I'm skeptical of this being practical due to regl's size in of itself, as it may be too large to take on as a dependency. I'm not sure anything is actionable from this issue specifically as it's an open ended discussion issue, and no one else has weighed in on it, so I'm going to go and close it. Feel free to request it to be re-opened or have any additional discussions as needed, but I would suggest bringing this up in the individual projects rather than in regl itself.
Description of the problem
It's difficult and complex these days to mix WebGL libraries together, to draw things using different libraries in the same webgl context. (examples of difficulties: mrdoob/three.js#8147, pixijs/pixijs#3230, pixijs/pixijs#3345, pixijs/pixijs#1366, pixijs/pixijs#298, jonobr1/two.js#233)
For example, suppose we would like to render Three, Babylon, and Pixi objects into the same WebGL context, in the same 3D space.
It is currently very difficult to do this because each WebGL library manages state of the context in their own ways, and these private internals often change and break solutions that people come up with because there's no standard way to do it.
Pixi.js v4 goes through efforts to make Pixi compatible with Three.js, so that it can render in a Three scene, but this is obviously fragile.
Solution
Enter Regl to the party.
Maybe if the foundations for each library (Three, Babylon, Pixi, Two, etc) were built on Regl, we'd have a common way of rendering to a single context.
Regl makes an abstraction just on top of raw WebGL for managing WebGL state. It doesn't render for you all the things that Three.js can, it only provides the minimal foundation for working with raw WebGL in a stateful way that is easy to manage.
It seems that libraries like Three, Babylon, PlayCanvas, Pixi, Two, etc, could benefit from using a standardized way for managing WebGL state, which would make it easy to combine renderings from any of these libraries into the same WebGL context.
What are your thoughts on refactoring the foundation of various WebGL libraries like Three.js/Pixi to use Regl for managing WebGL state? Does Regl offer enough flexibility for libraries like Three.js/Pixi to do what they need to do on top of Regl?
The text was updated successfully, but these errors were encountered: