i am implementing render to texture concept and have doubt regarding scope of a FBOs. After i am done with glDrawArrays call on default FBO with render to texture, i am deleting texture and non default FBO. Then i am calling glReadPixels to read contents on default FBO. So, my question is am i doing it right i mean should i call readpixel before deleting FBO and texture?
What i was assuming that after drawing it on default FBO we dont need non default FBO and texture but later some developer of OpenGL told me i am doing some strange things in my application referring to above. Please help me to understand this.