TransparentBackground.jslib 407 B

1234567891011121314
  1. var LibraryGLClear = {
  2. glClear: function(mask)
  3. {
  4. if (mask == 0x00004000)
  5. {
  6. var v = GLctx.getParameter(GLctx.COLOR_WRITEMASK);
  7. if (!v[0] && !v[1] && !v[2] && v[3])
  8. // We are trying to clear alpha only -- skip.
  9. return;
  10. }
  11. GLctx.clear(mask);
  12. }
  13. };
  14. mergeInto(LibraryManager.library, LibraryGLClear);