aboutsummaryrefslogtreecommitdiff
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
parent275900d217b354a92b97e645ea6de566b58c3476 (diff)
set alpha to false in WebGL rendering - it represents the screen, so no alpha is needed
-rw-r--r--src/library_browser.js7
-rw-r--r--tests/aniso.pngbin35041 -> 26812 bytes
-rw-r--r--tests/float_tex.pngbin19944 -> 18869 bytes
-rw-r--r--tests/gears.pngbin7832 -> 6407 bytes
-rw-r--r--tests/gl_ps.pngbin203535 -> 202598 bytes
-rw-r--r--tests/s3tc_crunch.pngbin353677 -> 271258 bytes
-rw-r--r--tests/screenshot-fog-density.pngbin154012 -> 157048 bytes
-rw-r--r--tests/screenshot-fog-exp2.pngbin119847 -> 122164 bytes
-rw-r--r--tests/screenshot-fog-linear.pngbin247928 -> 250343 bytes
-rw-r--r--tests/screenshot-fog-negative.pngbin79537 -> 80704 bytes
-rw-r--r--tests/screenshot-fog-simple.pngbin36557 -> 37940 bytes
-rw-r--r--tests/screenshot-gray-purple.pngbin242425 -> 241235 bytes
-rw-r--r--tests/screenshot-gray.pngbin203336 -> 202044 bytes
13 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);
diff --git a/tests/aniso.png b/tests/aniso.png
index 5f5812d2..2bcb2f5f 100644
--- a/tests/aniso.png
+++ b/tests/aniso.png
Binary files differ
diff --git a/tests/float_tex.png b/tests/float_tex.png
index 8c3c6502..8fc005ff 100644
--- a/tests/float_tex.png
+++ b/tests/float_tex.png
Binary files differ
diff --git a/tests/gears.png b/tests/gears.png
index ffb855c4..a35db625 100644
--- a/tests/gears.png
+++ b/tests/gears.png
Binary files differ
diff --git a/tests/gl_ps.png b/tests/gl_ps.png
index 185f7166..ac13ec0b 100644
--- a/tests/gl_ps.png
+++ b/tests/gl_ps.png
Binary files differ
diff --git a/tests/s3tc_crunch.png b/tests/s3tc_crunch.png
index 3510b83b..067be7aa 100644
--- a/tests/s3tc_crunch.png
+++ b/tests/s3tc_crunch.png
Binary files differ
diff --git a/tests/screenshot-fog-density.png b/tests/screenshot-fog-density.png
index cd1f6f1b..60f0c9ef 100644
--- a/tests/screenshot-fog-density.png
+++ b/tests/screenshot-fog-density.png
Binary files differ
diff --git a/tests/screenshot-fog-exp2.png b/tests/screenshot-fog-exp2.png
index cd5e6a63..4737a536 100644
--- a/tests/screenshot-fog-exp2.png
+++ b/tests/screenshot-fog-exp2.png
Binary files differ
diff --git a/tests/screenshot-fog-linear.png b/tests/screenshot-fog-linear.png
index 57534566..747c0c25 100644
--- a/tests/screenshot-fog-linear.png
+++ b/tests/screenshot-fog-linear.png
Binary files differ
diff --git a/tests/screenshot-fog-negative.png b/tests/screenshot-fog-negative.png
index 5b18a201..747063c9 100644
--- a/tests/screenshot-fog-negative.png
+++ b/tests/screenshot-fog-negative.png
Binary files differ
diff --git a/tests/screenshot-fog-simple.png b/tests/screenshot-fog-simple.png
index 527768fc..7624076c 100644
--- a/tests/screenshot-fog-simple.png
+++ b/tests/screenshot-fog-simple.png
Binary files differ
diff --git a/tests/screenshot-gray-purple.png b/tests/screenshot-gray-purple.png
index 514b29a1..eaf08e6a 100644
--- a/tests/screenshot-gray-purple.png
+++ b/tests/screenshot-gray-purple.png
Binary files differ
diff --git a/tests/screenshot-gray.png b/tests/screenshot-gray.png
index 16e45a7a..af06c256 100644
--- a/tests/screenshot-gray.png
+++ b/tests/screenshot-gray.png
Binary files differ