Remove ENABLE_WEBGL

This commit is contained in:
Tim Schaub
2017-12-12 17:21:42 -07:00
parent 755619fa87
commit 9e34c145c3
2 changed files with 10 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Map
*/
import {ENABLE_WEBGL, inherits} from './index.js';
import {inherits} from './index.js';
import _ol_PluggableMap_ from './PluggableMap.js';
import _ol_PluginType_ from './PluginType.js';
import _ol_control_ from './control.js';
@@ -27,14 +27,13 @@ _ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
_ol_renderer_canvas_VectorTileLayer_
]);
if (ENABLE_WEBGL) {
_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_webgl_Map_);
_ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
_ol_renderer_webgl_ImageLayer_,
_ol_renderer_webgl_TileLayer_,
_ol_renderer_webgl_VectorLayer_
]);
}
// TODO: move these to new ol-webgl package
_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_webgl_Map_);
_ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
_ol_renderer_webgl_ImageLayer_,
_ol_renderer_webgl_TileLayer_,
_ol_renderer_webgl_VectorLayer_
]);
/**

View File

@@ -25,18 +25,9 @@ export var ENABLE_PROJ4JS = true;
export var ENABLE_RASTER_REPROJECTION = true;
/**
* @type {boolean} Enable the WebGL renderer. Default is `true`. Setting
* this to false at compile time in advanced mode removes all code
* supporting the WebGL renderer from the build.
*/
export var ENABLE_WEBGL = true;
/**
* @type {boolean} Include debuggable shader sources. Default is `true`.
* This should be set to `false` for production builds (if `ENABLE_WEBGL`
* is `true`).
* This should be set to `false` for production builds.
*/
export var DEBUG_WEBGL = true;
@@ -71,7 +62,7 @@ var WEBGL_EXTENSIONS; // value is set below
var HAS_WEBGL = false;
if (ENABLE_WEBGL && 'WebGLRenderingContext' in window) {
if ('WebGLRenderingContext' in window) {
try {
var canvas = /** @type {HTMLCanvasElement} */
(document.createElement('CANVAS'));
@@ -154,7 +145,6 @@ export default {
DEFAULT_WMS_VERSION: DEFAULT_WMS_VERSION,
ENABLE_PROJ4JS: ENABLE_PROJ4JS,
ENABLE_RASTER_REPROJECTION: ENABLE_RASTER_REPROJECTION,
ENABLE_WEBGL: ENABLE_WEBGL,
DEBUG_WEBGL: DEBUG_WEBGL,
HAS_WEBGL: HAS_WEBGL,
WEBGL_MAX_TEXTURE_SIZE: WEBGL_MAX_TEXTURE_SIZE,