@@ -48,6 +48,9 @@ step during the `npm i` command.
4848This is a low-level interface, where most of the stuff is directly reflecting
4949GLFW API. GLFW ** does NOT EXPOSE** OpenGL commands, it only [ controls the window-related
5050setup and resources] ( http://www.glfw.org/docs/latest/group__window.html ) .
51+ To access OpenGL/WebGL API you can use [ webgl-raub] ( https://github.com/node-3d/webgl-raub )
52+ or any other similar addon.
53+
5154Aside from several additional features, this addon directly exposes the GLFW API to JS. E.g.:
5255
5356``` cpp
@@ -63,7 +66,12 @@ Nothing is added between you and GLFW, unless necessary or explicitly mentioned.
6366 `glfw.*`. E.g. `glfwPollEvents` -> `glfw.pollEvents`.
6467* All `GLFW_*` constants are accessible as
6568 `glfw.*`. E.g. `GLFW_TRUE` -> `glfw.TRUE`.
66-
69+ * Method `glfw.createWindow` takes some additional arguments. This is mostly related to
70+ JS events being generated from GLFW callbacks,
71+ and here's where you provide an Emitter object.
72+ * Pointers are directly exposed as numbers to JS and are expected as
73+ arguments in specific methods. Such as, `glfw.createWindow` returns a number
74+ (pointer), and then you provide it back to e.g. `glfw.setWindowTitle`.
6775
6876See [this example](/examples/vulkan.mjs) for raw GLFW calls.
6977
@@ -82,7 +90,7 @@ const wnd = new Window({ title: 'GLFW Test', vsync: true });
8290This class helps managing window objects and their events. It can also switch between
8391fullscreen, borderless and windowed modes.
8492
85- The first window creates an additional invisible root-window for context sharing.
93+ The first window creates an additional invisible root-window for context sharing
8694(so that you can also close any window and still keep the root context).
8795The platform context (pointers/handles) for sharing may be obtained when necessary.
8896
0 commit comments