What advise you to transfer the texture of an FBO to another texture in order to release the FBO ?
I want to accelerate this procedure :
mtexture = gl::Texture::create(mFbo->readPixels8u(mFbo->getBounds()));
PBO perhaps ?
Thank you in advance
why do you need to do this?
Internally, FBO is just an component that refers a (or more) texture as its render target. It barely cost much (if any) extra memory.
If for some reason you really don’t want your FBO anymore (for instance, your FBO has multiple render targets and you don’t need others anymore, or you want discard the depth texture), simply do
auto tex = mFbo->getColorTexture(0);
and reset your fbo. Since the new texture is a shared pointer, that particular one won’t be freed.