onTextureDispose method

void onTextureDispose(
  1. Event event
)

Implementation

void onTextureDispose(Event event) {
  var texture = event.target;

  texture.removeEventListener('dispose', onTextureDispose);

  deallocateTexture(texture);

  if (texture.isVideoTexture) {
    _videoTextures.remove(texture);
  }

  if (texture.isOpenGLTexture) {
    _videoTextures.remove(texture);
  }
}