Improve type checking in ol.renderer.webgl.Layer
This commit is contained in:
@@ -124,12 +124,18 @@ ol.renderer.webgl.Layer.prototype.bindFramebuffer =
|
|||||||
this.framebufferDimension != framebufferDimension) {
|
this.framebufferDimension != framebufferDimension) {
|
||||||
|
|
||||||
frameState.postRenderFunctions.push(
|
frameState.postRenderFunctions.push(
|
||||||
goog.partial(function(gl, framebuffer, texture) {
|
goog.partial(
|
||||||
if (!gl.isContextLost()) {
|
/**
|
||||||
gl.deleteFramebuffer(framebuffer);
|
* @param {WebGLRenderingContext} gl GL.
|
||||||
gl.deleteTexture(texture);
|
* @param {WebGLFramebuffer} framebuffer Framebuffer.
|
||||||
}
|
* @param {WebGLTexture} texture Texture.
|
||||||
}, gl, this.framebuffer, this.texture));
|
*/
|
||||||
|
function(gl, framebuffer, texture) {
|
||||||
|
if (!gl.isContextLost()) {
|
||||||
|
gl.deleteFramebuffer(framebuffer);
|
||||||
|
gl.deleteTexture(texture);
|
||||||
|
}
|
||||||
|
}, gl, this.framebuffer, this.texture));
|
||||||
|
|
||||||
var texture = gl.createTexture();
|
var texture = gl.createTexture();
|
||||||
gl.bindTexture(goog.webgl.TEXTURE_2D, texture);
|
gl.bindTexture(goog.webgl.TEXTURE_2D, texture);
|
||||||
|
|||||||
Reference in New Issue
Block a user