aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-14 22:21:08 +0100
committerAlon Zakai <alonzakai@gmail.com>2013-02-14 22:39:38 +0100
commitf8fbf5a424e630e194a8068a799c22d10229ea15 (patch)
treecbcc6b8edd4f60d2eef3ae62fae68eb8e69ba97f /src/library_browser.js
parent275900d217b354a92b97e645ea6de566b58c3476 (diff)
set alpha to false in WebGL rendering - it represents the screen, so no alpha is needed
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index e04aedd5..6af2ce0b 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -201,8 +201,13 @@ mergeInto(LibraryManager.library, {
return null;
}
#endif
+ var ctx;
try {
- var ctx = canvas.getContext(useWebGL ? 'experimental-webgl' : '2d');
+ if (useWebGL) {
+ ctx = canvas.getContext('experimental-webgl', { alpha: false });
+ } else {
+ ctx = canvas.getContext('2d');
+ }
if (!ctx) throw ':(';
} catch (e) {
Module.print('Could not create canvas - ' + e);