diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-24 17:07:14 -0500 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-24 17:07:14 -0500 |
commit | ca8db2849799350d1943e9e64544b0cf0d4b81a6 (patch) | |
tree | 17b353d0f219b27c85ee9a21da512f6bf45add3e | |
parent | d495fd27c2f492c891b82e367100fac0be213d67 (diff) |
Make the background of the canvas black
-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)'); } |