Rename location shader classes

And remove the now unneeded NAMESPACE variable
This commit is contained in:
Frederic Junod
2018-02-08 15:13:20 +01:00
parent 83d530e181
commit e25e61c3b7
24 changed files with 34 additions and 49 deletions

View File

@@ -8,7 +8,7 @@ import {intersects} from '../../extent.js';
import {isEmpty} from '../../obj.js';
import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
import {fragment, vertex} from '../webgl/circlereplay/defaultshader.js';
import _ol_render_webgl_circlereplay_defaultshader_Locations_ from '../webgl/circlereplay/defaultshader/Locations.js';
import Locations from '../webgl/circlereplay/defaultshader/Locations.js';
import WebGLReplay from '../webgl/Replay.js';
import _ol_render_webgl_ from '../webgl.js';
import _ol_webgl_ from '../../webgl.js';
@@ -203,7 +203,7 @@ WebGLCircleReplay.prototype.setUpProgram = function(gl, context, size, pixelRati
// get the locations
let locations;
if (!this.defaultLocations_) {
locations = new _ol_render_webgl_circlereplay_defaultshader_Locations_(gl, program);
locations = new Locations(gl, program);
this.defaultLocations_ = locations;
} else {
locations = this.defaultLocations_;

View File

@@ -12,7 +12,7 @@ import {isEmpty} from '../../obj.js';
import _ol_render_webgl_ from '../webgl.js';
import WebGLReplay from '../webgl/Replay.js';
import {fragment, vertex} from '../webgl/linestringreplay/defaultshader.js';
import _ol_render_webgl_linestringreplay_defaultshader_Locations_ from '../webgl/linestringreplay/defaultshader/Locations.js';
import Locations from '../webgl/linestringreplay/defaultshader/Locations.js';
import _ol_webgl_ from '../../webgl.js';
import WebGLBuffer from '../../webgl/Buffer.js';
@@ -446,7 +446,7 @@ WebGLLineStringReplay.prototype.setUpProgram = function(gl, context, size, pixel
// get the locations
let locations;
if (!this.defaultLocations_) {
locations = new _ol_render_webgl_linestringreplay_defaultshader_Locations_(gl, program);
locations = new Locations(gl, program);
this.defaultLocations_ = locations;
} else {
locations = this.defaultLocations_;

View File

@@ -10,7 +10,7 @@ import {linearRingContainsXY} from '../../geom/flat/contains.js';
import _ol_geom_flat_orient_ from '../../geom/flat/orient.js';
import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
import {fragment, vertex} from '../webgl/polygonreplay/defaultshader.js';
import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../webgl/polygonreplay/defaultshader/Locations.js';
import Locations from '../webgl/polygonreplay/defaultshader/Locations.js';
import WebGLLineStringReplay from '../webgl/LineStringReplay.js';
import WebGLReplay from '../webgl/Replay.js';
import _ol_render_webgl_ from '../webgl.js';
@@ -880,7 +880,7 @@ WebGLPolygonReplay.prototype.setUpProgram = function(gl, context, size, pixelRat
// get the locations
let locations;
if (!this.defaultLocations_) {
locations = new _ol_render_webgl_polygonreplay_defaultshader_Locations_(gl, program);
locations = new Locations(gl, program);
this.defaultLocations_ = locations;
} else {
locations = this.defaultLocations_;

View File

@@ -5,7 +5,7 @@ import {getUid, inherits} from '../../index.js';
import {intersects} from '../../extent.js';
import {isEmpty} from '../../obj.js';
import {fragment, vertex} from '../webgl/texturereplay/defaultshader.js';
import _ol_render_webgl_texturereplay_defaultshader_Locations_ from '../webgl/texturereplay/defaultshader/Locations.js';
import Locations from '../webgl/texturereplay/defaultshader/Locations.js';
import WebGLReplay from '../webgl/Replay.js';
import _ol_webgl_ from '../../webgl.js';
import WebGLContext from '../../webgl/Context.js';
@@ -278,7 +278,7 @@ WebGLTextureReplay.prototype.setUpProgram = function(gl, context, size, pixelRat
// get the locations
let locations;
if (!this.defaultLocations) {
locations = new _ol_render_webgl_texturereplay_defaultshader_Locations_(gl, program);
locations = new Locations(gl, program);
this.defaultLocations = locations;
} else {
locations = this.defaultLocations;

View File

@@ -1,4 +1,3 @@
//! NAMESPACE=_ol_render_webgl_circlereplay_defaultshader_
//! MODULE=ol/render/webgl/circlereplay/defaultshader

View File

@@ -12,7 +12,7 @@ import {DEBUG_WEBGL} from '../../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
const _ol_render_webgl_circlereplay_defaultshader_Locations_ = function(gl, program) {
const Locations = function(gl, program) {
/**
* @type {WebGLUniformLocation}
@@ -87,4 +87,4 @@ const _ol_render_webgl_circlereplay_defaultshader_Locations_ = function(gl, prog
program, DEBUG_WEBGL ? 'a_radius' : 'g');
};
export default _ol_render_webgl_circlereplay_defaultshader_Locations_;
export default Locations;

View File

@@ -1,4 +1,3 @@
//! NAMESPACE=_ol_render_webgl_linestringreplay_defaultshader_
//! MODULE=ol/render/webgl/linestringreplay/defaultshader

View File

@@ -12,7 +12,7 @@ import {DEBUG_WEBGL} from '../../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
const _ol_render_webgl_linestringreplay_defaultshader_Locations_ = function(gl, program) {
const Locations = function(gl, program) {
/**
* @type {WebGLUniformLocation}
@@ -93,4 +93,4 @@ const _ol_render_webgl_linestringreplay_defaultshader_Locations_ = function(gl,
program, DEBUG_WEBGL ? 'a_direction' : 'g');
};
export default _ol_render_webgl_linestringreplay_defaultshader_Locations_;
export default Locations;

View File

@@ -1,4 +1,3 @@
//! NAMESPACE=_ol_render_webgl_polygonreplay_defaultshader_
//! MODULE=ol/render/webgl/polygonreplay/defaultshader

View File

@@ -12,7 +12,7 @@ import {DEBUG_WEBGL} from '../../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
const _ol_render_webgl_polygonreplay_defaultshader_Locations_ = function(gl, program) {
const Locations = function(gl, program) {
/**
* @type {WebGLUniformLocation}
@@ -51,4 +51,4 @@ const _ol_render_webgl_polygonreplay_defaultshader_Locations_ = function(gl, pro
program, DEBUG_WEBGL ? 'a_position' : 'a');
};
export default _ol_render_webgl_polygonreplay_defaultshader_Locations_;
export default Locations;

View File

@@ -1,4 +1,3 @@
//! NAMESPACE=_ol_render_webgl_texturereplay_defaultshader_
//! MODULE=ol/render/webgl/texturereplay/defaultshader

View File

@@ -12,7 +12,7 @@ import {DEBUG_WEBGL} from '../../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
const _ol_render_webgl_texturereplay_defaultshader_Locations_ = function(gl, program) {
const Locations = function(gl, program) {
/**
* @type {WebGLUniformLocation}
@@ -75,4 +75,4 @@ const _ol_render_webgl_texturereplay_defaultshader_Locations_ = function(gl, pro
program, DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
};
export default _ol_render_webgl_texturereplay_defaultshader_Locations_;
export default Locations;

View File

@@ -7,7 +7,7 @@ import RenderEventType from '../../render/EventType.js';
import _ol_render_webgl_Immediate_ from '../../render/webgl/Immediate.js';
import LayerRenderer from '../Layer.js';
import {fragment, vertex} from '../webgl/defaultmapshader.js';
import _ol_renderer_webgl_defaultmapshader_Locations_ from '../webgl/defaultmapshader/Locations.js';
import Locations from '../webgl/defaultmapshader/Locations.js';
import _ol_transform_ from '../../transform.js';
import {create, fromTransform} from '../../vec/mat4.js';
import _ol_webgl_ from '../../webgl.js';
@@ -155,7 +155,7 @@ WebGLLayerRenderer.prototype.composeFrame = function(frameState, layerState, con
let locations;
if (!this.defaultLocations_) {
locations = new _ol_renderer_webgl_defaultmapshader_Locations_(gl, program);
locations = new Locations(gl, program);
this.defaultLocations_ = locations;
} else {
locations = this.defaultLocations_;

View File

@@ -14,7 +14,7 @@ import {roundUpToPowerOfTwo} from '../../math.js';
import RendererType from '../Type.js';
import WebGLLayerRenderer from '../webgl/Layer.js';
import {fragment, vertex} from '../webgl/tilelayershader.js';
import _ol_renderer_webgl_tilelayershader_Locations_ from '../webgl/tilelayershader/Locations.js';
import Locations from '../webgl/tilelayershader/Locations.js';
import {toSize} from '../../size.js';
import _ol_transform_ from '../../transform.js';
import _ol_webgl_ from '../../webgl.js';
@@ -223,7 +223,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
const program = context.getProgram(this.fragmentShader_, this.vertexShader_);
context.useProgram(program);
if (!this.locations_) {
this.locations_ = new _ol_renderer_webgl_tilelayershader_Locations_(gl, program);
this.locations_ = new Locations(gl, program);
}
context.bindBuffer(_ol_webgl_.ARRAY_BUFFER, this.renderArrayBuffer_);

View File

@@ -1,4 +1,3 @@
//! NAMESPACE=_ol_renderer_webgl_defaultmapshader_
//! MODULE=ol/renderer/webgl/defaultmapshader

View File

@@ -12,7 +12,7 @@ import {DEBUG_WEBGL} from '../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
const _ol_renderer_webgl_defaultmapshader_Locations_ = function(gl, program) {
const Locations = function(gl, program) {
/**
* @type {WebGLUniformLocation}
@@ -51,4 +51,4 @@ const _ol_renderer_webgl_defaultmapshader_Locations_ = function(gl, program) {
program, DEBUG_WEBGL ? 'a_texCoord' : 'c');
};
export default _ol_renderer_webgl_defaultmapshader_Locations_;
export default Locations;

View File

@@ -1,4 +1,3 @@
//! NAMESPACE=_ol_renderer_webgl_tilelayershader_
//! MODULE=ol/renderer/webgl/tilelayershader

View File

@@ -12,7 +12,7 @@ import {DEBUG_WEBGL} from '../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
const _ol_renderer_webgl_tilelayershader_Locations_ = function(gl, program) {
const Locations = function(gl, program) {
/**
* @type {WebGLUniformLocation}
@@ -39,4 +39,4 @@ const _ol_renderer_webgl_tilelayershader_Locations_ = function(gl, program) {
program, DEBUG_WEBGL ? 'a_texCoord' : 'c');
};
export default _ol_renderer_webgl_tilelayershader_Locations_;
export default Locations;

View File

@@ -12,7 +12,7 @@ import {DEBUG_WEBGL} from '../../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
const {{namespace}}Locations_ = function(gl, program) {
const Locations = function(gl, program) {
{{#uniforms}}
/**
@@ -31,4 +31,4 @@ const {{namespace}}Locations_ = function(gl, program) {
{{/attributes}}
};
export default {{namespace}}Locations_;
export default Locations;