ios - Can an OpenGLES 2.0 framebuffer be bound to a texture and a renderbuffer at the same time? -
brad larson provides great code here , here 'rendering scene texture-backed framebuffer', it's not clear whether same framebuffer use rest of drawing.
if attach renderbuffer framebuffer, can framebuffer render texture same call?
sounds might bit confused fbo usage. if need it, should started: apple developer - drawing offscreen. this too.
renderbuffer can bind fbo (framebuffer object). fbo create when don't want rendering displayed immediately, want read rendering result or perform additional rendering it. way fbos work in opengl es 2.0, have 1 color attachment point available (gl_color_attachment0 - fragment shader output variable gl_fragcolor connected attachment point), , can have 1 texture or renderbuffer attached it. answer last question, cannot have fbo simultaneously write color renderbuffer , texture.
as first part of question, depends whether using fbo or default framebuffer. chances behavior you're looking this:
- bind fbo
- render texture attached fbo
- bind default framebuffer
- use texture step 2 affect rendering in second renderpass.
hope answers question little bit.
Comments
Post a Comment