107 lines
2.0 KiB
Plaintext
107 lines
2.0 KiB
Plaintext
// This file is automatically generated, do not edit
|
|
goog.provide('{{namespace}}');
|
|
|
|
goog.require('ol');
|
|
goog.require('ol.webgl.Fragment');
|
|
goog.require('ol.webgl.Vertex');
|
|
|
|
|
|
/**
|
|
* @constructor
|
|
* @extends {ol.webgl.Fragment}
|
|
* @struct
|
|
*/
|
|
{{className}}.Fragment = function() {
|
|
ol.webgl.Fragment.call(this, {{className}}.Fragment.SOURCE);
|
|
};
|
|
ol.inherits({{className}}.Fragment, ol.webgl.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 = ol.DEBUG ?
|
|
{{className}}.Fragment.DEBUG_SOURCE :
|
|
{{className}}.Fragment.OPTIMIZED_SOURCE;
|
|
|
|
|
|
{{className}}.fragment = new {{className}}.Fragment();
|
|
|
|
|
|
/**
|
|
* @constructor
|
|
* @extends {ol.webgl.Vertex}
|
|
* @struct
|
|
*/
|
|
{{className}}.Vertex = function() {
|
|
ol.webgl.Vertex.call(this, {{className}}.Vertex.SOURCE);
|
|
};
|
|
ol.inherits({{className}}.Vertex, ol.webgl.Vertex);
|
|
|
|
|
|
/**
|
|
* @const
|
|
* @type {string}
|
|
*/
|
|
{{className}}.Vertex.DEBUG_SOURCE = '{{{getOriginalVertexSource}}}';
|
|
|
|
|
|
/**
|
|
* @const
|
|
* @type {string}
|
|
*/
|
|
{{className}}.Vertex.OPTIMIZED_SOURCE = '{{{getVertexSource}}}';
|
|
|
|
|
|
/**
|
|
* @const
|
|
* @type {string}
|
|
*/
|
|
{{className}}.Vertex.SOURCE = ol.DEBUG ?
|
|
{{className}}.Vertex.DEBUG_SOURCE :
|
|
{{className}}.Vertex.OPTIMIZED_SOURCE;
|
|
|
|
|
|
{{className}}.vertex = new {{className}}.Vertex();
|
|
|
|
|
|
/**
|
|
* @constructor
|
|
* @param {WebGLRenderingContext} gl GL.
|
|
* @param {WebGLProgram} program Program.
|
|
* @struct
|
|
*/
|
|
{{namespace}}.Locations = function(gl, program) {
|
|
{{#getUniforms}}
|
|
|
|
/**
|
|
* @type {WebGLUniformLocation}
|
|
*/
|
|
this.{{originalName}} = gl.getUniformLocation(
|
|
program, ol.DEBUG ? '{{originalName}}' : '{{shortName}}');
|
|
{{/getUniforms}}
|
|
{{#getAttributes}}
|
|
|
|
/**
|
|
* @type {number}
|
|
*/
|
|
this.{{originalName}} = gl.getAttribLocation(
|
|
program, ol.DEBUG ? '{{originalName}}' : '{{shortName}}');
|
|
{{/getAttributes}}
|
|
};
|