Improve type checking in ol.renderer.webgl.ImageLayer
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user