Merge pull request #6373 from tschaub/debug-webgl

Use the ol.DEBUG_WEBGL flag to debug shader sources
This commit is contained in:
Tim Schaub
2017-01-18 11:43:51 -06:00
committed by GitHub
10 changed files with 161 additions and 74 deletions

View File

@@ -83,6 +83,14 @@ ol.ENABLE_RASTER_REPROJECTION = true;
ol.ENABLE_WEBGL = true;
/**
* @define {boolean} Include debuggable shader sources. Default is `true`.
* This should be set to `false` for production builds (if `ol.ENABLE_WEBGL`
* is `true`).
*/
ol.DEBUG_WEBGL = true;
/**
* @define {number} The size in pixels of the first atlas image. Default is
* `256`.

View File

@@ -5,7 +5,6 @@ goog.require('ol');
goog.require('ol.webgl.Fragment');
goog.require('ol.webgl.Vertex');
if (ol.ENABLE_WEBGL) {
/**
@@ -37,7 +36,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.circlereplay.defaultshader.Fragment.SOURCE = ol.render.webgl.circlereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.circlereplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.circlereplay.defaultshader.Fragment.DEBUG_SOURCE :
ol.render.webgl.circlereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.circlereplay.defaultshader.fragment = new ol.render.webgl.circlereplay.defaultshader.Fragment();
@@ -72,7 +73,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.circlereplay.defaultshader.Vertex.SOURCE = ol.render.webgl.circlereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.circlereplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.circlereplay.defaultshader.Vertex.DEBUG_SOURCE :
ol.render.webgl.circlereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.circlereplay.defaultshader.vertex = new ol.render.webgl.circlereplay.defaultshader.Vertex();
@@ -89,62 +92,74 @@ if (ol.ENABLE_WEBGL) {
/**
* @type {WebGLUniformLocation}
*/
this.u_fillColor = gl.getUniformLocation(program, 'n');
this.u_fillColor = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_fillColor' : 'n');
/**
* @type {WebGLUniformLocation}
*/
this.u_lineWidth = gl.getUniformLocation(program, 'k');
this.u_lineWidth = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetRotateMatrix = gl.getUniformLocation(program, 'j');
this.u_offsetRotateMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetScaleMatrix = gl.getUniformLocation(program, 'i');
this.u_offsetScaleMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
/**
* @type {WebGLUniformLocation}
*/
this.u_opacity = gl.getUniformLocation(program, 'm');
this.u_opacity = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_opacity' : 'm');
/**
* @type {WebGLUniformLocation}
*/
this.u_pixelRatio = gl.getUniformLocation(program, 'l');
this.u_pixelRatio = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_pixelRatio' : 'l');
/**
* @type {WebGLUniformLocation}
*/
this.u_projectionMatrix = gl.getUniformLocation(program, 'h');
this.u_projectionMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
/**
* @type {WebGLUniformLocation}
*/
this.u_size = gl.getUniformLocation(program, 'p');
this.u_size = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_size' : 'p');
/**
* @type {WebGLUniformLocation}
*/
this.u_strokeColor = gl.getUniformLocation(program, 'o');
this.u_strokeColor = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_strokeColor' : 'o');
/**
* @type {number}
*/
this.a_instruction = gl.getAttribLocation(program, 'f');
this.a_instruction = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_instruction' : 'f');
/**
* @type {number}
*/
this.a_position = gl.getAttribLocation(program, 'e');
this.a_position = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_position' : 'e');
/**
* @type {number}
*/
this.a_radius = gl.getAttribLocation(program, 'g');
this.a_radius = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_radius' : 'g');
};
}

View File

@@ -5,7 +5,6 @@ goog.require('ol');
goog.require('ol.webgl.Fragment');
goog.require('ol.webgl.Vertex');
if (ol.ENABLE_WEBGL) {
/**
@@ -37,7 +36,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.imagereplay.defaultshader.Fragment.SOURCE = ol.render.webgl.imagereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.imagereplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.imagereplay.defaultshader.Fragment.DEBUG_SOURCE :
ol.render.webgl.imagereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.imagereplay.defaultshader.fragment = new ol.render.webgl.imagereplay.defaultshader.Fragment();
@@ -72,7 +73,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.imagereplay.defaultshader.Vertex.SOURCE = ol.render.webgl.imagereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.imagereplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.imagereplay.defaultshader.Vertex.DEBUG_SOURCE :
ol.render.webgl.imagereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.imagereplay.defaultshader.vertex = new ol.render.webgl.imagereplay.defaultshader.Vertex();
@@ -89,52 +92,62 @@ if (ol.ENABLE_WEBGL) {
/**
* @type {WebGLUniformLocation}
*/
this.u_image = gl.getUniformLocation(program, 'l');
this.u_image = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_image' : 'l');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetRotateMatrix = gl.getUniformLocation(program, 'j');
this.u_offsetRotateMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetScaleMatrix = gl.getUniformLocation(program, 'i');
this.u_offsetScaleMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
/**
* @type {WebGLUniformLocation}
*/
this.u_opacity = gl.getUniformLocation(program, 'k');
this.u_opacity = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_opacity' : 'k');
/**
* @type {WebGLUniformLocation}
*/
this.u_projectionMatrix = gl.getUniformLocation(program, 'h');
this.u_projectionMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
/**
* @type {number}
*/
this.a_offsets = gl.getAttribLocation(program, 'e');
this.a_offsets = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_offsets' : 'e');
/**
* @type {number}
*/
this.a_opacity = gl.getAttribLocation(program, 'f');
this.a_opacity = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_opacity' : 'f');
/**
* @type {number}
*/
this.a_position = gl.getAttribLocation(program, 'c');
this.a_position = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_position' : 'c');
/**
* @type {number}
*/
this.a_rotateWithView = gl.getAttribLocation(program, 'g');
this.a_rotateWithView = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
/**
* @type {number}
*/
this.a_texCoord = gl.getAttribLocation(program, 'd');
this.a_texCoord = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'd');
};
}

View File

@@ -5,7 +5,6 @@ goog.require('ol');
goog.require('ol.webgl.Fragment');
goog.require('ol.webgl.Vertex');
if (ol.ENABLE_WEBGL) {
/**
@@ -37,7 +36,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.linestringreplay.defaultshader.Fragment.SOURCE = ol.render.webgl.linestringreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.linestringreplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.linestringreplay.defaultshader.Fragment.DEBUG_SOURCE :
ol.render.webgl.linestringreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.linestringreplay.defaultshader.fragment = new ol.render.webgl.linestringreplay.defaultshader.Fragment();
@@ -72,7 +73,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.linestringreplay.defaultshader.Vertex.SOURCE = ol.render.webgl.linestringreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.linestringreplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.linestringreplay.defaultshader.Vertex.DEBUG_SOURCE :
ol.render.webgl.linestringreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.linestringreplay.defaultshader.vertex = new ol.render.webgl.linestringreplay.defaultshader.Vertex();
@@ -89,67 +92,80 @@ if (ol.ENABLE_WEBGL) {
/**
* @type {WebGLUniformLocation}
*/
this.u_color = gl.getUniformLocation(program, 'n');
this.u_color = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_color' : 'n');
/**
* @type {WebGLUniformLocation}
*/
this.u_lineWidth = gl.getUniformLocation(program, 'k');
this.u_lineWidth = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
/**
* @type {WebGLUniformLocation}
*/
this.u_miterLimit = gl.getUniformLocation(program, 'l');
this.u_miterLimit = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_miterLimit' : 'l');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetRotateMatrix = gl.getUniformLocation(program, 'j');
this.u_offsetRotateMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetScaleMatrix = gl.getUniformLocation(program, 'i');
this.u_offsetScaleMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
/**
* @type {WebGLUniformLocation}
*/
this.u_opacity = gl.getUniformLocation(program, 'm');
this.u_opacity = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_opacity' : 'm');
/**
* @type {WebGLUniformLocation}
*/
this.u_pixelRatio = gl.getUniformLocation(program, 'p');
this.u_pixelRatio = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_pixelRatio' : 'p');
/**
* @type {WebGLUniformLocation}
*/
this.u_projectionMatrix = gl.getUniformLocation(program, 'h');
this.u_projectionMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
/**
* @type {WebGLUniformLocation}
*/
this.u_size = gl.getUniformLocation(program, 'o');
this.u_size = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_size' : 'o');
/**
* @type {number}
*/
this.a_direction = gl.getAttribLocation(program, 'g');
this.a_direction = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_direction' : 'g');
/**
* @type {number}
*/
this.a_lastPos = gl.getAttribLocation(program, 'd');
this.a_lastPos = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_lastPos' : 'd');
/**
* @type {number}
*/
this.a_nextPos = gl.getAttribLocation(program, 'f');
this.a_nextPos = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_nextPos' : 'f');
/**
* @type {number}
*/
this.a_position = gl.getAttribLocation(program, 'e');
this.a_position = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_position' : 'e');
};
}

View File

@@ -5,7 +5,6 @@ goog.require('ol');
goog.require('ol.webgl.Fragment');
goog.require('ol.webgl.Vertex');
if (ol.ENABLE_WEBGL) {
/**
@@ -37,7 +36,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.polygonreplay.defaultshader.Fragment.SOURCE = ol.render.webgl.polygonreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.polygonreplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.polygonreplay.defaultshader.Fragment.DEBUG_SOURCE :
ol.render.webgl.polygonreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
ol.render.webgl.polygonreplay.defaultshader.fragment = new ol.render.webgl.polygonreplay.defaultshader.Fragment();
@@ -72,7 +73,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.render.webgl.polygonreplay.defaultshader.Vertex.SOURCE = ol.render.webgl.polygonreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.polygonreplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
ol.render.webgl.polygonreplay.defaultshader.Vertex.DEBUG_SOURCE :
ol.render.webgl.polygonreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
ol.render.webgl.polygonreplay.defaultshader.vertex = new ol.render.webgl.polygonreplay.defaultshader.Vertex();
@@ -89,32 +92,38 @@ if (ol.ENABLE_WEBGL) {
/**
* @type {WebGLUniformLocation}
*/
this.u_color = gl.getUniformLocation(program, 'e');
this.u_color = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_color' : 'e');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetRotateMatrix = gl.getUniformLocation(program, 'd');
this.u_offsetRotateMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'd');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetScaleMatrix = gl.getUniformLocation(program, 'c');
this.u_offsetScaleMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'c');
/**
* @type {WebGLUniformLocation}
*/
this.u_opacity = gl.getUniformLocation(program, 'f');
this.u_opacity = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_opacity' : 'f');
/**
* @type {WebGLUniformLocation}
*/
this.u_projectionMatrix = gl.getUniformLocation(program, 'b');
this.u_projectionMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'b');
/**
* @type {number}
*/
this.a_position = gl.getAttribLocation(program, 'a');
this.a_position = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_position' : 'a');
};
}

View File

@@ -5,7 +5,6 @@ goog.require('ol');
goog.require('ol.webgl.Fragment');
goog.require('ol.webgl.Vertex');
if (ol.ENABLE_WEBGL) {
/**
@@ -37,7 +36,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.renderer.webgl.defaultmapshader.Fragment.SOURCE = ol.renderer.webgl.defaultmapshader.Fragment.OPTIMIZED_SOURCE;
ol.renderer.webgl.defaultmapshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
ol.renderer.webgl.defaultmapshader.Fragment.DEBUG_SOURCE :
ol.renderer.webgl.defaultmapshader.Fragment.OPTIMIZED_SOURCE;
ol.renderer.webgl.defaultmapshader.fragment = new ol.renderer.webgl.defaultmapshader.Fragment();
@@ -72,7 +73,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.renderer.webgl.defaultmapshader.Vertex.SOURCE = ol.renderer.webgl.defaultmapshader.Vertex.OPTIMIZED_SOURCE;
ol.renderer.webgl.defaultmapshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
ol.renderer.webgl.defaultmapshader.Vertex.DEBUG_SOURCE :
ol.renderer.webgl.defaultmapshader.Vertex.OPTIMIZED_SOURCE;
ol.renderer.webgl.defaultmapshader.vertex = new ol.renderer.webgl.defaultmapshader.Vertex();
@@ -89,32 +92,38 @@ if (ol.ENABLE_WEBGL) {
/**
* @type {WebGLUniformLocation}
*/
this.u_opacity = gl.getUniformLocation(program, 'f');
this.u_opacity = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_opacity' : 'f');
/**
* @type {WebGLUniformLocation}
*/
this.u_projectionMatrix = gl.getUniformLocation(program, 'e');
this.u_projectionMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'e');
/**
* @type {WebGLUniformLocation}
*/
this.u_texCoordMatrix = gl.getUniformLocation(program, 'd');
this.u_texCoordMatrix = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_texCoordMatrix' : 'd');
/**
* @type {WebGLUniformLocation}
*/
this.u_texture = gl.getUniformLocation(program, 'g');
this.u_texture = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_texture' : 'g');
/**
* @type {number}
*/
this.a_position = gl.getAttribLocation(program, 'b');
this.a_position = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_position' : 'b');
/**
* @type {number}
*/
this.a_texCoord = gl.getAttribLocation(program, 'c');
this.a_texCoord = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
};
}

View File

@@ -5,7 +5,6 @@ goog.require('ol');
goog.require('ol.webgl.Fragment');
goog.require('ol.webgl.Vertex');
if (ol.ENABLE_WEBGL) {
/**
@@ -37,7 +36,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.renderer.webgl.tilelayershader.Fragment.SOURCE = ol.renderer.webgl.tilelayershader.Fragment.OPTIMIZED_SOURCE;
ol.renderer.webgl.tilelayershader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
ol.renderer.webgl.tilelayershader.Fragment.DEBUG_SOURCE :
ol.renderer.webgl.tilelayershader.Fragment.OPTIMIZED_SOURCE;
ol.renderer.webgl.tilelayershader.fragment = new ol.renderer.webgl.tilelayershader.Fragment();
@@ -72,7 +73,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
ol.renderer.webgl.tilelayershader.Vertex.SOURCE = ol.renderer.webgl.tilelayershader.Vertex.OPTIMIZED_SOURCE;
ol.renderer.webgl.tilelayershader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
ol.renderer.webgl.tilelayershader.Vertex.DEBUG_SOURCE :
ol.renderer.webgl.tilelayershader.Vertex.OPTIMIZED_SOURCE;
ol.renderer.webgl.tilelayershader.vertex = new ol.renderer.webgl.tilelayershader.Vertex();
@@ -89,22 +92,26 @@ if (ol.ENABLE_WEBGL) {
/**
* @type {WebGLUniformLocation}
*/
this.u_texture = gl.getUniformLocation(program, 'e');
this.u_texture = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_texture' : 'e');
/**
* @type {WebGLUniformLocation}
*/
this.u_tileOffset = gl.getUniformLocation(program, 'd');
this.u_tileOffset = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? 'u_tileOffset' : 'd');
/**
* @type {number}
*/
this.a_position = gl.getAttribLocation(program, 'b');
this.a_position = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_position' : 'b');
/**
* @type {number}
*/
this.a_texCoord = gl.getAttribLocation(program, 'c');
this.a_texCoord = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
};
}

View File

@@ -5,7 +5,6 @@ goog.require('ol');
goog.require('ol.webgl.Fragment');
goog.require('ol.webgl.Vertex');
if (ol.ENABLE_WEBGL) {
/**
@@ -37,7 +36,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
{{className}}.Fragment.SOURCE = {{className}}.Fragment.OPTIMIZED_SOURCE;
{{className}}.Fragment.SOURCE = ol.DEBUG_WEBGL ?
{{className}}.Fragment.DEBUG_SOURCE :
{{className}}.Fragment.OPTIMIZED_SOURCE;
{{className}}.fragment = new {{className}}.Fragment();
@@ -72,7 +73,9 @@ if (ol.ENABLE_WEBGL) {
* @const
* @type {string}
*/
{{className}}.Vertex.SOURCE = {{className}}.Vertex.OPTIMIZED_SOURCE;
{{className}}.Vertex.SOURCE = ol.DEBUG_WEBGL ?
{{className}}.Vertex.DEBUG_SOURCE :
{{className}}.Vertex.OPTIMIZED_SOURCE;
{{className}}.vertex = new {{className}}.Vertex();
@@ -90,14 +93,16 @@ if (ol.ENABLE_WEBGL) {
/**
* @type {WebGLUniformLocation}
*/
this.{{originalName}} = gl.getUniformLocation(program, '{{shortName}}');
this.{{originalName}} = gl.getUniformLocation(
program, ol.DEBUG_WEBGL ? '{{originalName}}' : '{{shortName}}');
{{/getUniforms}}
{{#getAttributes}}
/**
* @type {number}
*/
this.{{originalName}} = gl.getAttribLocation(program, '{{shortName}}');
this.{{originalName}} = gl.getAttribLocation(
program, ol.DEBUG_WEBGL ? '{{originalName}}' : '{{shortName}}');
{{/getAttributes}}
};