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