Rename goog.DEBUG to ol.DEBUG

This commit is contained in:
Andreas Hocevar
2016-08-28 17:02:49 +02:00
parent 92ab5a079c
commit d1e4b33760
115 changed files with 701 additions and 691 deletions
+5 -5
View File
@@ -83,7 +83,7 @@ ol.webgl.Context = function(canvas, gl) {
// use the OES_element_index_uint extension if available
if (this.hasOESElementIndexUint) {
var ext = gl.getExtension('OES_element_index_uint');
goog.DEBUG && console.assert(ext,
ol.DEBUG && console.assert(ext,
'Failed to get extension "OES_element_index_uint"');
}
@@ -113,7 +113,7 @@ ol.webgl.Context.prototype.bindBuffer = function(target, buf) {
} else {
var buffer = gl.createBuffer();
gl.bindBuffer(target, buffer);
goog.DEBUG && console.assert(target == ol.webgl.ARRAY_BUFFER ||
ol.DEBUG && console.assert(target == ol.webgl.ARRAY_BUFFER ||
target == ol.webgl.ELEMENT_ARRAY_BUFFER,
'target is supposed to be an ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER');
var /** @type {ArrayBufferView} */ arrayBuffer;
@@ -138,7 +138,7 @@ ol.webgl.Context.prototype.bindBuffer = function(target, buf) {
ol.webgl.Context.prototype.deleteBuffer = function(buf) {
var gl = this.getGL();
var bufferKey = String(ol.getUid(buf));
goog.DEBUG && console.assert(bufferKey in this.bufferCache_,
ol.DEBUG && console.assert(bufferKey in this.bufferCache_,
'attempted to delete uncached buffer');
var bufferCacheEntry = this.bufferCache_[bufferKey];
if (!gl.isContextLost()) {
@@ -218,7 +218,7 @@ ol.webgl.Context.prototype.getShader = function(shaderObject) {
var shader = gl.createShader(shaderObject.getType());
gl.shaderSource(shader, shaderObject.getSource());
gl.compileShader(shader);
goog.DEBUG && console.assert(
ol.DEBUG && console.assert(
gl.getShaderParameter(shader, ol.webgl.COMPILE_STATUS) ||
gl.isContextLost(),
gl.getShaderInfoLog(shader) || 'illegal state, shader not compiled or context lost');
@@ -248,7 +248,7 @@ ol.webgl.Context.prototype.getProgram = function(
gl.attachShader(program, this.getShader(fragmentShaderObject));
gl.attachShader(program, this.getShader(vertexShaderObject));
gl.linkProgram(program);
goog.DEBUG && console.assert(
ol.DEBUG && console.assert(
gl.getProgramParameter(program, ol.webgl.LINK_STATUS) ||
gl.isContextLost(),
gl.getProgramInfoLog(program) || 'illegal state, shader not linked or context lost');