Files
openlayers/src/ol/webgl/shader.mustache
T
Frederic Junod 49b8f90e66 Add missing goog.provide
The new version of the closure-compiler (version 20150729) wants that all the classes
tagged with `@constructor` to be provided (with `goog.provide`).
2015-08-25 09:26:10 +02:00

107 lines
2.1 KiB
Plaintext

// This file is automatically generated, do not edit
goog.provide('{{namespace}}');
goog.provide('{{namespace}}.Locations');
goog.provide('{{className}}Fragment');
goog.provide('{{className}}Vertex');
goog.require('ol.webgl.shader');
/**
* @constructor
* @extends {ol.webgl.shader.Fragment}
* @struct
*/
{{className}}Fragment = function() {
goog.base(this, {{className}}Fragment.SOURCE);
};
goog.inherits({{className}}Fragment, ol.webgl.shader.Fragment);
goog.addSingletonGetter({{className}}Fragment);
/**
* @const
* @type {string}
*/
{{className}}Fragment.DEBUG_SOURCE = 'precision mediump float;\n{{{getOriginalFragmentSource}}}';
/**
* @const
* @type {string}
*/
{{className}}Fragment.OPTIMIZED_SOURCE = 'precision mediump float;{{{getFragmentSource}}}';
/**
* @const
* @type {string}
*/
{{className}}Fragment.SOURCE = goog.DEBUG ?
{{className}}Fragment.DEBUG_SOURCE :
{{className}}Fragment.OPTIMIZED_SOURCE;
/**
* @constructor
* @extends {ol.webgl.shader.Vertex}
* @struct
*/
{{className}}Vertex = function() {
goog.base(this, {{className}}Vertex.SOURCE);
};
goog.inherits({{className}}Vertex, ol.webgl.shader.Vertex);
goog.addSingletonGetter({{className}}Vertex);
/**
* @const
* @type {string}
*/
{{className}}Vertex.DEBUG_SOURCE = '{{{getOriginalVertexSource}}}';
/**
* @const
* @type {string}
*/
{{className}}Vertex.OPTIMIZED_SOURCE = '{{{getVertexSource}}}';
/**
* @const
* @type {string}
*/
{{className}}Vertex.SOURCE = goog.DEBUG ?
{{className}}Vertex.DEBUG_SOURCE :
{{className}}Vertex.OPTIMIZED_SOURCE;
/**
* @constructor
* @param {WebGLRenderingContext} gl GL.
* @param {WebGLProgram} program Program.
* @struct
*/
{{namespace}}.Locations = function(gl, program) {
{{#getUniforms}}
/**
* @type {WebGLUniformLocation}
*/
this.{{originalName}} = gl.getUniformLocation(
program, goog.DEBUG ? '{{originalName}}' : '{{shortName}}');
{{/getUniforms}}
{{#getAttributes}}
/**
* @type {number}
*/
this.{{originalName}} = gl.getAttribLocation(
program, goog.DEBUG ? '{{originalName}}' : '{{shortName}}');
{{/getAttributes}}
};