Use exported function from ol/webgl
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @module ol
|
* @module ol
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import webgl from './webgl.js';
|
import {getContext} from './webgl.js';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,7 +45,7 @@ if ('WebGLRenderingContext' in window) {
|
|||||||
try {
|
try {
|
||||||
const canvas = /** @type {HTMLCanvasElement} */
|
const canvas = /** @type {HTMLCanvasElement} */
|
||||||
(document.createElement('CANVAS'));
|
(document.createElement('CANVAS'));
|
||||||
const gl = webgl.getContext(canvas, {failIfMajorPerformanceCaveat: true});
|
const gl = getContext(canvas, {failIfMajorPerformanceCaveat: true});
|
||||||
if (gl) {
|
if (gl) {
|
||||||
HAS_WEBGL = true;
|
HAS_WEBGL = true;
|
||||||
WEBGL_MAX_TEXTURE_SIZE = /** @type {number} */
|
WEBGL_MAX_TEXTURE_SIZE = /** @type {number} */
|
||||||
|
|||||||
Reference in New Issue
Block a user