Rename goog.DEBUG to ol.DEBUG
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -35,7 +35,7 @@ ol.inherits({{className}}.Fragment, ol.webgl.Fragment);
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
{{className}}.Fragment.SOURCE = goog.DEBUG ?
|
||||
{{className}}.Fragment.SOURCE = ol.DEBUG ?
|
||||
{{className}}.Fragment.DEBUG_SOURCE :
|
||||
{{className}}.Fragment.OPTIMIZED_SOURCE;
|
||||
|
||||
@@ -72,7 +72,7 @@ ol.inherits({{className}}.Vertex, ol.webgl.Vertex);
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
{{className}}.Vertex.SOURCE = goog.DEBUG ?
|
||||
{{className}}.Vertex.SOURCE = ol.DEBUG ?
|
||||
{{className}}.Vertex.DEBUG_SOURCE :
|
||||
{{className}}.Vertex.OPTIMIZED_SOURCE;
|
||||
|
||||
@@ -93,7 +93,7 @@ ol.inherits({{className}}.Vertex, ol.webgl.Vertex);
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.{{originalName}} = gl.getUniformLocation(
|
||||
program, goog.DEBUG ? '{{originalName}}' : '{{shortName}}');
|
||||
program, ol.DEBUG ? '{{originalName}}' : '{{shortName}}');
|
||||
{{/getUniforms}}
|
||||
{{#getAttributes}}
|
||||
|
||||
@@ -101,6 +101,6 @@ ol.inherits({{className}}.Vertex, ol.webgl.Vertex);
|
||||
* @type {number}
|
||||
*/
|
||||
this.{{originalName}} = gl.getAttribLocation(
|
||||
program, goog.DEBUG ? '{{originalName}}' : '{{shortName}}');
|
||||
program, ol.DEBUG ? '{{originalName}}' : '{{shortName}}');
|
||||
{{/getAttributes}}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user