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
Starting a thread to discuss how to introduce the WebGL API and possibly the ANGLE library as a dependency.
Currently, Window.js has two GL contexts: one "owned" by Skia and used by each CanvasRenderingContext2D (including window.canvas), and another used internally for the native window. At the end of each frame, windowjs blits the texture that window.canvas is rendering to into the main screen framebuffer (and any overlays, like the console, FPS meter, etc.)
The initial idea for WebGL is to have window.gl with a context ready to use, that draws under the window.canvas surface.
It should be possible to bind a CanvasRenderingContext2D's texture to the WebGL context; or, least, to make a copy. This allows rendering to a canvas in 2D and then using that as a texture in GL; for example, for UIs in 3D and for text rendering.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Starting a thread to discuss how to introduce the WebGL API and possibly the ANGLE library as a dependency.
Currently, Window.js has two GL contexts: one "owned" by Skia and used by each CanvasRenderingContext2D (including window.canvas), and another used internally for the native window. At the end of each frame, windowjs blits the texture that window.canvas is rendering to into the main screen framebuffer (and any overlays, like the console, FPS meter, etc.)
The initial idea for WebGL is to have window.gl with a context ready to use, that draws under the window.canvas surface.
It should be possible to bind a CanvasRenderingContext2D's texture to the WebGL context; or, least, to make a copy. This allows rendering to a canvas in 2D and then using that as a texture in GL; for example, for UIs in 3D and for text rendering.
Beta Was this translation helpful? Give feedback.
All reactions