Cross-platform GLFW / OpenGL ES / WebGL bindings for Reason
C
46
14 commits
updated Feb 6, 2020
esy is used for building, so if you don't have esy, install it:
npm install -g esy@0.4.9
esy installesy buildNOTE: If you've never built with
esybefore, the first compile could take some time - it builds theocamlcompiler as well ascmake. Incremental builds, though, are extremely fast!
A very simple example project is provided - you can test it out here:
NATIVE:
cd _build/install/default/bin./test_glfw (./test_glfw.exe on Windows)WEB:
_build/install/default/bin. (I use npm install -g http-server).index.htmlThis project is licensed under the MIT License - see LICENSE for more details.
For the most part, we strive to have API compatibility for GLFW and OpenGL. This library supports compilation to both native and JSOO targets. In the JSOO case, we emulate the GLFW APIs.
We do have some exceptions:
glfwGetNativeWindowWe wrap the native window access functions in a function glfwGetNativeWindow. This returns a NativeWindow.t, where the underlying value is platform specific:
HWND for the current window.void * pointer to the NSWindow.void * pointer to the X11 Window.HTMLCanvasElement representing the window.C
73.3%
C++
10.7%
OCaml
9.2%
JavaScript
6.6%
Cross-platform GLFW / OpenGL ES / WebGL bindings for Reason
C
46
14 commits
updated Feb 6, 2020
esy is used for building, so if you don't have esy, install it:
npm install -g esy@0.4.9
esy installesy buildNOTE: If you've never built with
esybefore, the first compile could take some time - it builds theocamlcompiler as well ascmake. Incremental builds, though, are extremely fast!
A very simple example project is provided - you can test it out here:
NATIVE:
cd _build/install/default/bin./test_glfw (./test_glfw.exe on Windows)WEB:
_build/install/default/bin. (I use npm install -g http-server).index.htmlThis project is licensed under the MIT License - see LICENSE for more details.
For the most part, we strive to have API compatibility for GLFW and OpenGL. This library supports compilation to both native and JSOO targets. In the JSOO case, we emulate the GLFW APIs.
We do have some exceptions:
glfwGetNativeWindowWe wrap the native window access functions in a function glfwGetNativeWindow. This returns a NativeWindow.t, where the underlying value is platform specific:
HWND for the current window.void * pointer to the NSWindow.void * pointer to the X11 Window.HTMLCanvasElement representing the window.C
73.3%
C++
10.7%
OCaml
9.2%
JavaScript
6.6%