How to combine two TSF?

OK, so I have 4 buffers, 3 FBOs and a render buffer. Let me explain.

I have a FBO that saves the scene before I draw it to the render buffer.

I have a background buffer that contains the background of the scene.

I have a user buffer that the user is manipulating.

When the user does some action, I draw into the user buffer using some kind of mixing.

Then, to redraw the whole scene, what I want to do is clear the view buffer, draw a background buffer in the view buffer, change the blend, and then draw the user buffer into the view buffer. Finally, render the view buffer into the render buffer.

However, I cannot figure out how to draw an FBO for another FBO. What I want to do is essentially merge and merge the two FBOs, but I cannot figure out how to do it! I am very new to OpenGL ES, so thanks for the help.

+3
source share
1 answer

Customize your off-frame framebuffers to render the texture directly. This link shows you how to:

http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/WorkingwithEAGLContexts/WorkingwithEAGLContexts.html#//apple_ref/doc/uid/TP40008793-CH103-W7

, , . , OpenGL. , . glFramebufferTexture2DOES renderbuffer glFramebufferRenderbufferOES. , . OpenGL. , , -[EAGLContext renderBufferStorage:fromDrawable:] EAGLContext renderbuffer. OpenGL ES.

, - , renderbuffer ( , ).

+2

Source: https://habr.com/ru/post/1738566/


All Articles