onTextureDispose method

void onTextureDispose(
  1. Event event
)

Implementation

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

  texture.removeEventListener('dispose', onTextureDispose);

  deallocateTexture(texture);

  if (texture is VideoTexture) {
    _videoTextures.remove(texture);
  }

  if (texture is OpenGLTexture) {
    _videoTextures.remove(texture);
  }
}