3.2.1029 • Published 5 years ago

reason-glfw v3.2.1029

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Build Status Build Status npm version

reason-glfw

Cross-platform Reason / OCaml bindings for GLFW - supports Native (OpenGL) and Javascript (WebGL))

Building

esy is used for building, so if you don't have esy, install it:

npm install -g esy@0.4.9
  • esy install
  • esy build

NOTE: If you've never built with esy before, the first compile could take some time - it builds the ocaml compiler as well as cmake. Incremental builds, though, are extremely fast!

Running

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:

  • Start an http-server at _build/install/default/bin. (I use npm install -g http-server).
  • Navigate to index.html

License

This project is licensed under the MIT License - see LICENSE for more details.

Design

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:

glfwGetNativeWindow

We wrap the native window access functions in a function glfwGetNativeWindow. This returns a NativeWindow.t, where the underlying value is platform specific:

  • Windows - HWND for the current window.
  • OSX - void * pointer to the NSWindow.
  • Linux - void * pointer to the X11 Window.
  • JS - HTMLCanvasElement representing the window.

Acknowledgements

3.2.1029

5 years ago

3.2.1028

5 years ago

3.2.1027

5 years ago

3.2.1026

5 years ago

3.2.1025

5 years ago

3.2.1024

5 years ago

3.2.1023

5 years ago

3.2.1022

5 years ago

3.2.1021

5 years ago

3.2.1020

5 years ago

3.2.1019

5 years ago

3.2.1018

5 years ago

3.2.1017

5 years ago

3.2.1016

5 years ago

3.2.1015

5 years ago

3.2.1014

5 years ago

3.2.1013

5 years ago

3.2.1012

5 years ago

3.2.1011

5 years ago

3.2.1010

5 years ago

3.2.1009

5 years ago

3.2.1008

5 years ago

3.2.1007

5 years ago

3.2.1006

5 years ago

3.2.1005

5 years ago

3.2.1004

5 years ago

3.2.1003

5 years ago

3.2.1002

5 years ago

3.2.1001

5 years ago

1.0.0

5 years ago