updateSource method

void updateSource(
  1. FlutterAngleTexture texture, [
  2. WebGLTexture? sourceTexture
])

Implementation

void updateSource(FlutterAngleTexture texture, [WebGLTexture? sourceTexture]) async {
  if (sourceTexture != null) {
    texture.rawOpenGl.glClearColor(0.0, 0.0, 0.0, 0.0);
    texture.rawOpenGl.glClear(16384 | 256 | 1024);
    texture.rawOpenGl.glViewport(0, 0, (texture.options.width*texture.options.dpr).toInt(),( texture.options.height*texture.options.dpr).toInt());
    _worker?.renderTexture(sourceTexture,isFBO: true);
    texture.rawOpenGl.glFinish();
  }
}