Improve type checking in ol.renderer.webgl.ImageLayer

This commit is contained in:
Tom Payne
2013-11-20 11:03:32 +01:00
parent a613b19360
commit 2ba33b8cad

View File

@@ -114,11 +114,16 @@ ol.renderer.webgl.ImageLayer.prototype.renderFrame =
texture = this.createTexture_(image_);
if (!goog.isNull(this.texture)) {
frameState.postRenderFunctions.push(
goog.partial(function(gl, texture) {
if (!gl.isContextLost()) {
gl.deleteTexture(texture);
}
}, gl, this.texture));
goog.partial(
/**
* @param {WebGLRenderingContext} gl GL.
* @param {WebGLTexture} texture Texture.
*/
function(gl, texture) {
if (!gl.isContextLost()) {
gl.deleteTexture(texture);
}
}, gl, this.texture));
}
}
}