Created
October 28, 2016 16:59
-
-
Save evilpie/0512b497193997b279a6237b48c45010 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let canvas = Dom_html.getElementById("test-canvas"); | |
let gl = WebGL.getContext(Js.coerce canvas Dom_html.CoerceTo.canvas (fun _ => assert false)); | |
Graphics.clear(gl, {r: 1.0, g: 0.7, b: 1.0, a: 1.0}); | |
let gl2 = Js.Opt.get gl (fun _ => assert false); | |
gl2#clearColor(1.0, 0.7, 1.0, 1.0); | |
Error: This expression has type WebGL.renderingContext Js.t | |
It has no method clearColor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment