diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-30 10:24:53 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-30 10:24:53 -0700 |
commit | b614f2bc5d9fc421565824b1ceb9a3384f26f35f (patch) | |
tree | 243c47baa4c6ce4273a5743d79f3c0dbc78789e5 /src/library_glut.js | |
parent | c70758e3b49beb016a3d9db7b609c499d55de48b (diff) | |
parent | 7eaa78060c34489c7e56193c725641303d520f31 (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/library_glut.js')
-rw-r--r-- | src/library_glut.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/library_glut.js b/src/library_glut.js index d33f8436..b146cf47 100644 --- a/src/library_glut.js +++ b/src/library_glut.js @@ -237,8 +237,7 @@ var LibraryGLUT = { document.removeEventListener('mozfullscreenchange', GLUT.onFullScreenEventChange, true); document.removeEventListener('webkitfullscreenchange', GLUT.onFullScreenEventChange, true); } - Module['canvas'].width = width; - Module['canvas'].height = height; + Browser.setCanvasSize(width, height); /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // console.log("GLUT.reshapeFunc (from FS): " + width + ", " + height); @@ -274,8 +273,8 @@ var LibraryGLUT = { }, glutInitWindowSize: function(width, height) { - Module['canvas'].width = GLUT.initWindowWidth = width; - Module['canvas'].height = GLUT.initWindowHeight = height; + Browser.setCanvasSize( GLUT.initWindowWidth = width, + GLUT.initWindowHeight = height ); }, glutInitWindowPosition: function(x, y) { @@ -371,8 +370,7 @@ var LibraryGLUT = { glutReshapeWindow: function(width, height) { GLUT.cancelFullScreen(); // console.log("glutReshapeWindow: " + width + ", " + height); - Module['canvas'].width = width; - Module['canvas'].height = height; + Browser.setCanvasSize(width, height); if (GLUT.reshapeFunc) { // console.log("GLUT.reshapeFunc: " + width + ", " + height); FUNCTION_TABLE[GLUT.reshapeFunc](width, height); |