Android Opengl FBO offscreen

I am developing finger paint like Android application. I am using OpenGL ES 2.0. Basically, I have an image in which each touch screen should correspond to an alpha circle, where another image below will be shown. I tried different methods, but rather slow, because it functions like using organic glTexSubImage2D, which slows down the rendering phase. I am trying to understand the use of FBOs as they allow for off-screen rendering. Could someone better explain what rendering behind the scenes means, and what benefits can be gained to speed up my method?

I believe that off-screen means that you can change the framebuffer I created from the onDrawFrame path? In another thread?

+6
source share
2 answers

In addition to being able to render to a screen window using OpenGL ES 2.0, you can also display on invisible surfaces outside the screen called pbuffers (short for pixel buffer). Pbuffers can take full advantage of any acceleration hardware available with OpenGL ES 2.0, just like a window does. Pbuffers are most often used to create texture maps. If everything you want to do is rendered onto the texture, we recommend using framebuffer objects (covered in Chapter 12, “Framebuffer Objects”) instead of pbuffers because they are more efficient. However, pbuffers can be useful in some cases where framebuffer objects cannot be used, for example, when rendering off-screen surfaces with OpenGL ES, and then use it as a texture in another API such as OpenVG.

[source: OpenGL ES 2.0 Programming Guide]

Hope this helps. Read this carefully: "pbuffers can still be useful for rendering to the screen using OpenGL ES"

+1
source

You are approaching a large memory bandwidth, since you need to read (part) of the screen and return the same amount of data back to the GPU memory again. This is very slow, and your drawing code waits before the image is transferred back to the GPU before rendering. Have you considered drawing ATVs for each finger press or some primitive that brings your needs closer? Why do you need OpenGL?

0
source

All Articles