activateTexture method

void activateTexture(
  1. FlutterAngleTexture texture
)

Implementation

void activateTexture(FlutterAngleTexture texture) {
  _rawOpenGl.glBindFramebuffer(GL_FRAMEBUFFER, texture.fboId);

  // If we have an iOS EGL surface created from IOSurface, use it
  if ((_isApple || Platform.isAndroid) && texture.surfaceId != nullptr) {
    eglMakeCurrent(_display, texture.surfaceId!, texture.surfaceId!, _baseAppContext);
    return;
  }

  _rawOpenGl.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, texture.rboId);
  _activeFramebuffer = texture.fboId;
}