Renamed WebGLContext to Helper for clarity

This commit is contained in:
Olivier Guyot
2018-11-15 17:45:03 +01:00
parent 494b817f47
commit d3294730f1
2 changed files with 5 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
import LayerRenderer from '../Layer';
import WebGLBuffer from '../../webgl/Buffer';
import {DYNAMIC_DRAW, ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, FLOAT} from '../../webgl';
import WebGLContext, {DefaultAttrib, DefaultUniform} from '../../webgl/Context';
import WebGLHelper, {DefaultAttrib, DefaultUniform} from '../../webgl/Helper';
import WebGLVertex from "../../webgl/Vertex";
import WebGLFragment from "../../webgl/Fragment";
import GeometryType from "../../geom/GeometryType";
@@ -63,7 +63,7 @@ class WebGLPointsLayerRenderer extends LayerRenderer {
const options = opt_options || {};
this.context_ = new WebGLContext({
this.context_ = new WebGLHelper({
postProcessingShader: options.postProcessingShader
});

View File

@@ -1,5 +1,5 @@
/**
* @module ol/webgl/Context
* @module ol/webgl/Helper
*/
import {getUid} from '../util.js';
import {EXTENSIONS as WEBGL_EXTENSIONS} from '../webgl.js';
@@ -78,7 +78,7 @@ const FRAMEBUFFER_FRAGMENT_SHADER = `
* Will handle attributes, uniforms, buffers, textures, frame buffers.
* The context will always render to a frame buffer in order to allow post-processing.
*/
class WebGLContext extends Disposable {
class WebGLHelper extends Disposable {
/**
*/
@@ -202,8 +202,6 @@ class WebGLContext extends Disposable {
this.renderTargetAttribLocation_ = gl.getAttribLocation(this.renderTargetProgram_, 'a_position');
this.renderTargetUniformLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_screenSize');
this.renderTargetTextureLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_image');
this.aa = this.createEmptyTexture(256, 256);
}
/**
@@ -628,4 +626,4 @@ export function createEmptyTexture(gl, width, height, opt_wrapS, opt_wrapT) {
export function createTexture(gl, image, opt_wrapS, opt_wrapT) {
}
export default WebGLContext;
export default WebGLHelper;