diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-14 22:21:08 +0100 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-14 22:39:38 +0100 |
commit | f8fbf5a424e630e194a8068a799c22d10229ea15 (patch) | |
tree | cbcc6b8edd4f60d2eef3ae62fae68eb8e69ba97f | |
parent | 275900d217b354a92b97e645ea6de566b58c3476 (diff) |
set alpha to false in WebGL rendering - it represents the screen, so no alpha is needed
-rw-r--r-- | src/library_browser.js | 7 | ||||
-rw-r--r-- | tests/aniso.png | bin | 35041 -> 26812 bytes | |||
-rw-r--r-- | tests/float_tex.png | bin | 19944 -> 18869 bytes | |||
-rw-r--r-- | tests/gears.png | bin | 7832 -> 6407 bytes | |||
-rw-r--r-- | tests/gl_ps.png | bin | 203535 -> 202598 bytes | |||
-rw-r--r-- | tests/s3tc_crunch.png | bin | 353677 -> 271258 bytes | |||
-rw-r--r-- | tests/screenshot-fog-density.png | bin | 154012 -> 157048 bytes | |||
-rw-r--r-- | tests/screenshot-fog-exp2.png | bin | 119847 -> 122164 bytes | |||
-rw-r--r-- | tests/screenshot-fog-linear.png | bin | 247928 -> 250343 bytes | |||
-rw-r--r-- | tests/screenshot-fog-negative.png | bin | 79537 -> 80704 bytes | |||
-rw-r--r-- | tests/screenshot-fog-simple.png | bin | 36557 -> 37940 bytes | |||
-rw-r--r-- | tests/screenshot-gray-purple.png | bin | 242425 -> 241235 bytes | |||
-rw-r--r-- | tests/screenshot-gray.png | bin | 203336 -> 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 Binary files differindex 5f5812d2..2bcb2f5f 100644 --- a/tests/aniso.png +++ b/tests/aniso.png diff --git a/tests/float_tex.png b/tests/float_tex.png Binary files differindex 8c3c6502..8fc005ff 100644 --- a/tests/float_tex.png +++ b/tests/float_tex.png diff --git a/tests/gears.png b/tests/gears.png Binary files differindex ffb855c4..a35db625 100644 --- a/tests/gears.png +++ b/tests/gears.png diff --git a/tests/gl_ps.png b/tests/gl_ps.png Binary files differindex 185f7166..ac13ec0b 100644 --- a/tests/gl_ps.png +++ b/tests/gl_ps.png diff --git a/tests/s3tc_crunch.png b/tests/s3tc_crunch.png Binary files differindex 3510b83b..067be7aa 100644 --- a/tests/s3tc_crunch.png +++ b/tests/s3tc_crunch.png diff --git a/tests/screenshot-fog-density.png b/tests/screenshot-fog-density.png Binary files differindex cd1f6f1b..60f0c9ef 100644 --- a/tests/screenshot-fog-density.png +++ b/tests/screenshot-fog-density.png diff --git a/tests/screenshot-fog-exp2.png b/tests/screenshot-fog-exp2.png Binary files differindex cd5e6a63..4737a536 100644 --- a/tests/screenshot-fog-exp2.png +++ b/tests/screenshot-fog-exp2.png diff --git a/tests/screenshot-fog-linear.png b/tests/screenshot-fog-linear.png Binary files differindex 57534566..747c0c25 100644 --- a/tests/screenshot-fog-linear.png +++ b/tests/screenshot-fog-linear.png diff --git a/tests/screenshot-fog-negative.png b/tests/screenshot-fog-negative.png Binary files differindex 5b18a201..747063c9 100644 --- a/tests/screenshot-fog-negative.png +++ b/tests/screenshot-fog-negative.png diff --git a/tests/screenshot-fog-simple.png b/tests/screenshot-fog-simple.png Binary files differindex 527768fc..7624076c 100644 --- a/tests/screenshot-fog-simple.png +++ b/tests/screenshot-fog-simple.png diff --git a/tests/screenshot-gray-purple.png b/tests/screenshot-gray-purple.png Binary files differindex 514b29a1..eaf08e6a 100644 --- a/tests/screenshot-gray-purple.png +++ b/tests/screenshot-gray-purple.png diff --git a/tests/screenshot-gray.png b/tests/screenshot-gray.png Binary files differindex 16e45a7a..af06c256 100644 --- a/tests/screenshot-gray.png +++ b/tests/screenshot-gray.png |