Skip to content

Files

Latest commit

May 25, 2020
1352d07 · May 25, 2020

History

History
21 lines (11 loc) · 1.06 KB

notes.md

File metadata and controls

21 lines (11 loc) · 1.06 KB

Core idea: present native openGL (ES3) capabilities to node.js using the WebGL2 API.

Why native GL? Native performance, ability to create multiple windows/contexts with fully shared CPU and GPU memory, etc. for applications that require other native capabilities and do not need a DOM or other browser-centric capabilities.

Why WebGL2 API? A fairly stable API that makes a decent fit between GLES3 and the javascript language without being strange, + ability to prototype in a browser and copy code directly into native app.

Compare:

differences

The gl context is not created from a canvas, but loaded from a module

gl = canvas.getContext("webgl2"); => gl = require("./gles3.js")

Instead of canvas, it needs a rendering surface, such as a GLFW window

gl.canvas does not exist