Node: escape hatch for more advanced WebGL stuff
See original GitHub issueNode should expose a more generic escape hatch to use gl and do any WebGL stuff.
Node should expose a basic way to implement your own draw()
. that way, people can do whatever they want with gl
, but the contract should be clear (should you still receive the uniforms? is the shader in the scope? should there be a more generic contract that Node implements?). The simplest example is to call gl.clear()
to fill a color. Try regl in this paradigm. Try Three.js in this paradigm.
The main problem is most WebGL libs are intrusive and alter the gl state (e.g. they don’t expect to just draw in the current bounded framebuffer).
e.g. https://github.com/mrdoob/three.js/issues/7483#issuecomment-264195243
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
stackgl/headless-gl: Windowless WebGL for node.js - GitHub
gl lets you create a WebGL context in Node. js without making a window or loading a full browser environment. It aspires to...
Read more >Reconcile All The Things - Acko.net
Like a scriptable node in a DFG, it's an escape hatch inside the run-time. But we're also still missing something: actual memoization. While...
Read more >npmjs react
Npmjs ReactThe npm package react receives a total of 16,078,277 downloads a ... This is an escape hatch for working with heavily customized...
Read more >Raw WebGL. While it is possible to render 3D… - Alain Galvan
Refer to this blog post on designing web libraries and apps for more details on Node.js, packages, etc. Project Layout. As your project...
Read more >Solid: CHANGELOG.md | Fossies
No longer supporting hydratable DOM SSR in patched(ie... JSDOM) node environments. Use the standard SSR methods instead. Can still run Solid in JSDOM...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome, following this thread.
status update: gl-react-native now expose the EXGLView directly, but there is still a usecase to have such an escape hatch that you want to render something with a lib into a FBO and pipe the result to the gl-react stack of effects.
probably this would not be part of
<Node>
like initially stated, but instead be a new component… the main concern with libs like Three.js is we need them to draw on a specific framebuffer and not directly on the canvas. so it might be something to fix in Three.js if we want the interop possible.we also need to figure out how it would be possible to “save & restore” the GL states across libs and this sounds the main headache to having this whole feature possible maybe https://github.com/stackgl/gl-state solves that but also need to see if it’s not an overhead to have