diff options
author | pommicket <pommicket@gmail.com> | 2023-09-06 23:55:57 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-09-06 23:55:57 -0400 |
commit | e6162f5c8acea642fd0884a6b8db367b911e5461 (patch) | |
tree | cf1d96d3b55d392b2819fcaa6364a79a23bc32c5 /pugl.js | |
parent | 0310afbb044619c2166b1667c0fde12948a238cf (diff) |
Diffstat (limited to 'pugl.js')
-rw-r--r-- | pugl.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -2822,10 +2822,16 @@ function startup() { if (!has_error()) export_widgets_to_local_storage(); }); - gl = canvas.getContext('webgl2'); + const context_attributes = { + // without this, "save image as..." is broken on firefox + // see https://bugzilla.mozilla.org/show_bug.cgi?id=749824 + preserveDrawingBuffer: true, + }; + + gl = canvas.getContext('webgl2', context_attributes); if (gl === null) { // support for very-old-but-not-ancient browsers - gl = canvas.getContext('experimental-webgl2'); + gl = canvas.getContext('experimental-webgl2', context_attributes); if (gl === null) { show_error('your browser doesnt support webgl2.\noh well.'); return; |