This commit is contained in:
Tim Schaub
2022-03-19 14:49:07 -06:00
parent e10b7470a6
commit d7cb12a016
2 changed files with 19 additions and 1 deletions
+8 -1
View File
@@ -2,6 +2,7 @@
* @module ol/webgl
*/
import {SAFARI_BUG_237906} from './has.js';
import {assign} from './obj.js';
/**
@@ -91,7 +92,13 @@ const CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];
* @return {WebGLRenderingContext} WebGL rendering context.
*/
export function getContext(canvas, opt_attributes) {
const attributes = assign({preserveDrawingBuffer: true}, opt_attributes);
const attributes = assign(
{
preserveDrawingBuffer: true,
antialias: SAFARI_BUG_237906 ? false : true, // https://bugs.webkit.org/show_bug.cgi?id=237906
},
opt_attributes
);
const ii = CONTEXT_IDS.length;
for (let i = 0; i < ii; ++i) {
try {