Hello,
I debugged my graphic application via mali debugger and I get confused with the information I captured. Here's my questions.
1. a frame contains several render passes(eg. render pass 0, render pass 1, ...) and framebuffers(eg. framebuffer 0, framebuffer 1, ...). What is a render pass and a framebuffer(framebuffer 0, framebuffer 1, ...) mean? Does it mean a single object in a frame?
2. I've read a blog https://community.arm.com/groups/arm-mali-graphics/blog/2014/04/28/mali-graphics-performance-2-how-to-correctly-handle-framebuffers, it's impressive. There are two render targets in OpenGL ES, on-screen render target and off-screen render target. As is known, Mali GPU has two framebuffers on hardware, FB0 and FB1. What is the relationship between render targets and framebuffer(FB0 and FB1)?
Thanks, it really helps!
A single frame consists of several framebuffer objects, a framebuffer object in OpenGL ES means a single image. So how is these images composed? surfaceflinger?
I use OpenGL ES 2.0 and I found that a draw call(eg. glDrawElements(...)) does not strictly corrspond to a glUseProgram(). A glUseProgram() may corrspond to several glDrawElements(...). I noticed that each glDrawElements(...) has a glBindBuffer(...) in front. Does it mean a program(glUseProgram()) is used by multiple glDrawElements(...) but the results are written to different framebuffer objects?
> So how is these images composed? surfaceflinger
Only the window surface (FBO0) is visible to the window system; how the rest are used is down the application. Normally the application will use off-screen renders as a source texture in a later renderpass.
Does it mean a program(glUseProgram()) is used by multiple glDrawElements(...) but the results are written to different framebuffer objects?
The current framebuffer object is set by glBindFramebuffer(). OpenGL ES makes most of the resources orthogonal so they are just building blocks which can be assembled for each operation (e.g. different buffers, textures, programs, and state form one rendering operation, but can be used in other operations too).