activateTexture method
Implementation
void activateTexture(FlutterAngleTexture texture) {
if(_disposed) return;
gl.glViewport(0, 0, (texture.options.width*texture.options.dpr).toInt(),( texture.options.height*texture.options.dpr).toInt());
gl.glBindFramebuffer(GL_FRAMEBUFFER, texture.fboId);
// If we have an iOS EGL surface created from IOSurface, use it
if (_useSurface && texture.surfaceId != nullptr) {
_libEGL!.eglMakeCurrent(_display, texture.surfaceId!, texture.surfaceId!, _baseAppContext);
return;
}
if (!_isRBO) gl.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D, texture.rboId, 0);
else gl.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, texture.rboId);
_activeFramebuffer = texture.fboId;
}