Renamed WebGLContext to Helper for clarity
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
import LayerRenderer from '../Layer';
|
import LayerRenderer from '../Layer';
|
||||||
import WebGLBuffer from '../../webgl/Buffer';
|
import WebGLBuffer from '../../webgl/Buffer';
|
||||||
import {DYNAMIC_DRAW, ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, FLOAT} from '../../webgl';
|
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 WebGLVertex from "../../webgl/Vertex";
|
||||||
import WebGLFragment from "../../webgl/Fragment";
|
import WebGLFragment from "../../webgl/Fragment";
|
||||||
import GeometryType from "../../geom/GeometryType";
|
import GeometryType from "../../geom/GeometryType";
|
||||||
@@ -63,7 +63,7 @@ class WebGLPointsLayerRenderer extends LayerRenderer {
|
|||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
|
|
||||||
this.context_ = new WebGLContext({
|
this.context_ = new WebGLHelper({
|
||||||
postProcessingShader: options.postProcessingShader
|
postProcessingShader: options.postProcessingShader
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/webgl/Context
|
* @module ol/webgl/Helper
|
||||||
*/
|
*/
|
||||||
import {getUid} from '../util.js';
|
import {getUid} from '../util.js';
|
||||||
import {EXTENSIONS as WEBGL_EXTENSIONS} from '../webgl.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.
|
* Will handle attributes, uniforms, buffers, textures, frame buffers.
|
||||||
* The context will always render to a frame buffer in order to allow post-processing.
|
* 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.renderTargetAttribLocation_ = gl.getAttribLocation(this.renderTargetProgram_, 'a_position');
|
||||||
this.renderTargetUniformLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_screenSize');
|
this.renderTargetUniformLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_screenSize');
|
||||||
this.renderTargetTextureLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_image');
|
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 function createTexture(gl, image, opt_wrapS, opt_wrapT) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default WebGLContext;
|
export default WebGLHelper;
|
||||||
Reference in New Issue
Block a user