Files
openlayers/src/ol/webgl/shader.mustache
Tom Payne 14da0cfd11 Don't escape HTML characters in shader generation
This tells Mustache not to escape <, >, &, and " characters.
2013-04-29 11:18:49 +02:00

101 lines
1.9 KiB
Plaintext

// This file is automatically generated, do not edit
goog.provide('{{namespace}}');
goog.require('ol.webgl.shader');
/**
* @constructor
* @extends {ol.webgl.shader.Fragment}
*/
{{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}
*/
{{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.
*/
{{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}}
};