diff options
-rw-r--r-- | src/library_gl.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 17b9bcd6..fd07d2f0 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -511,6 +511,9 @@ var LibraryGLUT = { var ctx = Module.canvas.getContext('experimental-webgl'); if (!ctx) throw 'Could not create canvas :('; Module.ctx = ctx; + // Set the background of the canvas to black, because glut gives us a + // window which has a black background by default. + Module.canvas.style.backgroundColor = "black"; } catch (e) { Module.print('(canvas not available)'); } |