HAS_WEBGL is false if ENABLE_WEBGL is false

This commit is contained in:
Éric Lemoine
2013-12-18 11:18:47 +01:00
parent 3df49423ad
commit 7fe684a6d4
2 changed files with 2 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ ol.BrowserFeature.HAS_TOUCH = ol.ASSUME_TOUCH ||
* @type {boolean}
* @todo stability experimental
*/
ol.BrowserFeature.HAS_WEBGL = (
ol.BrowserFeature.HAS_WEBGL = ol.ENABLE_WEBGL && (
/**
* @return {boolean} WebGL supported.
*/

View File

@@ -1299,7 +1299,7 @@ ol.Map.createOptionsInternal = function(options) {
break;
}
} else if (rendererHint == ol.RendererHint.WEBGL) {
if (ol.ENABLE_WEBGL && ol.BrowserFeature.HAS_WEBGL) {
if (ol.BrowserFeature.HAS_WEBGL) {
rendererConstructor = ol.renderer.webgl.Map;
break;
}