Sounds like you might be a little confused about using FBO. If you need it, you should start: Apple Developer - off-screen painting . It may also help.
Renderbuffer is something you can associate with an FBO (framebuffer object). FBO is what you create when you donβt want your rendering to appear immediately, but want to read the rendering result or perform additional rendering. How FBOs work in OpenGL ES 2.0, you have only one color anchor point (GL_COLOR_ATTACHMENT0 - your fragment shader output variable gl_FragColor is connected to this anchor point), and only one texture or rendering can be attached to it. Therefore, to answer this last question, you cannot have an FBO that simultaneously writes color to renderbuffer and texture.
As for the first part of your question, it depends on whether you are already using FBO or the default framebuffer. Most likely, the behavior you are looking for looks something like this:
- tie fbo
- do something texture attached to fbo
- binds default framebuffer
- use the texture from step 2 to affect the rendering in your second render window.
Hope this answers your question a bit.
source share