Set the default of WEBGL_MAX_TEXTURE_SIZE to undefined
By doing so the examples will also work if WebGL is not supported.
This commit is contained in:
@@ -15,7 +15,8 @@ var atlasManager = new ol.style.AtlasManager({
|
||||
// we increase the default size so that all symbols fit into
|
||||
// a single atlas image
|
||||
size: 512,
|
||||
maxSize: ol.has.WEBGL_MAX_TEXTURE_SIZE});
|
||||
maxSize: ol.has.WEBGL_MAX_TEXTURE_SIZE
|
||||
});
|
||||
|
||||
var symbolInfo = [{
|
||||
opacity: 1.0,
|
||||
|
||||
@@ -124,9 +124,9 @@ ol.has.WEBGL;
|
||||
|
||||
/**
|
||||
* The maximum supported WebGL texture size in pixels. If WebGL is not
|
||||
* supported, the value is set to `-1`.
|
||||
* supported, the value is set to `undefined`.
|
||||
* @const
|
||||
* @type {number}
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
ol.has.WEBGL_MAX_TEXTURE_SIZE;
|
||||
@@ -143,8 +143,9 @@ ol.has.WEBGL_EXTENSIONS;
|
||||
(function() {
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
var hasWebGL = false;
|
||||
var textureSize = -1;
|
||||
var textureSize;
|
||||
var /** @type {Array.<string>} */ extensions = [];
|
||||
|
||||
if ('WebGLRenderingContext' in goog.global) {
|
||||
try {
|
||||
var canvas = /** @type {HTMLCanvasElement} */
|
||||
|
||||
Reference in New Issue
Block a user