Merge pull request #7148 from ahocevar/webgl-define
Remove ol.ENABLE_WEBGL wrap from WebGL files
This commit is contained in:
@@ -3,8 +3,6 @@ goog.provide('ol.render.webgl');
|
||||
goog.require('ol');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {string}
|
||||
@@ -101,5 +99,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {number}
|
||||
*/
|
||||
ol.render.webgl.EPSILON = Number.EPSILON || 2.220446049250313e-16;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Buffer');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.webgl.Replay}
|
||||
@@ -420,5 +418,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.styles_.push([fillStyleColor, strokeStyleColor, strokeStyleWidth]);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl.Fragment');
|
||||
goog.require('ol.webgl.Vertex');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Fragment}
|
||||
@@ -162,5 +160,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.a_radius = gl.getAttribLocation(
|
||||
program, ol.DEBUG_WEBGL ? 'a_radius' : 'g');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ goog.require('ol.render.webgl.TextureReplay');
|
||||
goog.require('ol.webgl.Buffer');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.webgl.TextureReplay}
|
||||
@@ -169,5 +167,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
ol.render.webgl.ImageReplay.prototype.getHitDetectionTextures = function() {
|
||||
return this.hitDetectionTextures_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ goog.require('ol.render.VectorContext');
|
||||
goog.require('ol.render.webgl.ReplayGroup');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.VectorContext}
|
||||
@@ -413,5 +411,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
ol.render.webgl.Immediate.prototype.setTextStyle = function(textStyle) {
|
||||
this.textStyle_ = textStyle;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Buffer');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.webgl.Replay}
|
||||
@@ -685,5 +683,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
MITER_BOTTOM: 19,
|
||||
MITER_TOP: 23
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl.Fragment');
|
||||
goog.require('ol.webgl.Vertex');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Fragment}
|
||||
@@ -168,5 +166,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, ol.DEBUG_WEBGL ? 'a_position' : 'e');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Buffer');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.webgl.Replay}
|
||||
@@ -1071,5 +1069,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.lineStringReplay.setFillStrokeStyle(null, nullStrokeStyle);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl.Fragment');
|
||||
goog.require('ol.webgl.Vertex');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Fragment}
|
||||
@@ -126,5 +124,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, ol.DEBUG_WEBGL ? 'a_position' : 'a');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ goog.require('ol.vec.Mat4');
|
||||
goog.require('ol.webgl');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @abstract
|
||||
@@ -361,5 +359,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
var offsetInBytes = start * elementSize;
|
||||
gl.drawElements(ol.webgl.TRIANGLES, numItems, elementType, offsetInBytes);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ goog.require('ol.render.webgl.PolygonReplay');
|
||||
goog.require('ol.render.webgl.TextReplay');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.ReplayGroup}
|
||||
@@ -321,5 +319,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
'Polygon': ol.render.webgl.PolygonReplay,
|
||||
'Text': ol.render.webgl.TextReplay
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ goog.require('ol.style.AtlasManager');
|
||||
goog.require('ol.webgl.Buffer');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.webgl.TextureReplay}
|
||||
@@ -451,5 +449,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
ideographic: 0.8,
|
||||
bottom: 1
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ goog.require('ol.render.webgl.Replay');
|
||||
goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Context');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @abstract
|
||||
@@ -494,4 +492,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @returns {Array.<WebGLTexture>} Textures.
|
||||
*/
|
||||
ol.render.webgl.TextureReplay.prototype.getHitDetectionTextures = function() {};
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl.Fragment');
|
||||
goog.require('ol.webgl.Vertex');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Fragment}
|
||||
@@ -150,5 +148,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.a_texCoord = gl.getAttribLocation(
|
||||
program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'd');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl.Fragment');
|
||||
goog.require('ol.webgl.Vertex');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Fragment}
|
||||
@@ -126,5 +124,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.a_texCoord = gl.getAttribLocation(
|
||||
program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Context');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.webgl.Layer}
|
||||
@@ -333,5 +331,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
|
||||
return transform;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ goog.require('ol.webgl.Buffer');
|
||||
goog.require('ol.webgl.Context');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @abstract
|
||||
@@ -268,5 +266,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @template S,T,U
|
||||
*/
|
||||
ol.renderer.webgl.Layer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {};
|
||||
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ goog.require('ol.webgl.Context');
|
||||
goog.require('ol.webgl.ContextEventType');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.Map}
|
||||
@@ -595,5 +593,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Buffer');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.webgl.Layer}
|
||||
@@ -409,5 +407,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl.Fragment');
|
||||
goog.require('ol.webgl.Vertex');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Fragment}
|
||||
@@ -114,5 +112,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.a_texCoord = gl.getAttribLocation(
|
||||
program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ goog.require('ol.renderer.webgl.Layer');
|
||||
goog.require('ol.transform');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.webgl.Layer}
|
||||
@@ -343,5 +341,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
return loading;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@ goog.provide('ol.webgl');
|
||||
goog.require('ol');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/** Constants taken from goog.webgl
|
||||
*/
|
||||
|
||||
@@ -290,5 +288,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Array.<number>=} opt_arr Array.
|
||||
@@ -55,5 +53,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
STREAM_DRAW: ol.webgl.STREAM_DRAW,
|
||||
DYNAMIC_DRAW: ol.webgl.DYNAMIC_DRAW
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.ContextEventType');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* A WebGL context for accessing low-level WebGL capabilities.
|
||||
@@ -371,5 +369,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
|
||||
return texture;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Shader');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Shader}
|
||||
@@ -25,5 +23,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
ol.webgl.Fragment.prototype.getType = function() {
|
||||
return ol.webgl.FRAGMENT_SHADER;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ goog.require('ol');
|
||||
goog.require('ol.functions');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @abstract
|
||||
@@ -42,5 +40,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @return {boolean} Is animated?
|
||||
*/
|
||||
ol.webgl.Shader.prototype.isAnimated = ol.functions.FALSE;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ goog.require('ol');
|
||||
goog.require('ol.webgl.Fragment');
|
||||
goog.require('ol.webgl.Vertex');
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Fragment}
|
||||
@@ -106,5 +104,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
program, ol.DEBUG_WEBGL ? '{{originalName}}' : '{{shortName}}');
|
||||
{{/getAttributes}}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ goog.require('ol.webgl');
|
||||
goog.require('ol.webgl.Shader');
|
||||
|
||||
|
||||
if (ol.ENABLE_WEBGL) {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.webgl.Shader}
|
||||
@@ -25,5 +23,3 @@ if (ol.ENABLE_WEBGL) {
|
||||
ol.webgl.Vertex.prototype.getType = function() {
|
||||
return ol.webgl.VERTEX_SHADER;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@ const parentPackage = require('../package.json');
|
||||
const thisPackage = require('../package/package.json');
|
||||
|
||||
const defines = {
|
||||
'ol.ENABLE_WEBGL': false
|
||||
// Compiler defines go here, e.g.
|
||||
// 'ol.ENABLE_WEBGL': false
|
||||
};
|
||||
|
||||
function rename(name) {
|
||||
|
||||
Reference in New Issue
Block a user