diff options
Diffstat (limited to 'src/library_gl.js')
-rw-r--r-- | src/library_gl.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 811601ec..84c49d83 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -531,6 +531,7 @@ var LibraryGLUT = { }, glutCreateWindow: function(name) { +#if USE_TYPED_ARRAYS try { var ctx = Module.canvas.getContext('experimental-webgl'); if (!ctx) throw 'Could not create canvas :('; @@ -541,6 +542,9 @@ var LibraryGLUT = { } catch (e) { Module.print('(canvas not available)'); } +#else + Module.print('(USE_TYPED_ARRAYS needs to be enabled for WebGL)'); +#endif }, glutInitDisplayMode: function(mode) {}, |