OpenGl is rendered directly to the bitmap (without any representation)

I need to apply some pixel shaders to a bitmap (using OpenGL) and send the result to the server. The rendering is supposed to be done in the background, so I cannot create a GLSurfaceView for this purpose. So my question is: is it possible to render OpenGL on Android without using GLSurfaceView? How to render directly to a bitmap, or canvas or some kind of buffer / array? Or maybe it is possible to use some GLSurfaceView dummy?

+7
source share
2 answers

This SO post contains a link to the anddev post . Down a bit, someone created a PixelBuffer class that reuses the GLSurfaceView.Renderer interface, but other than that, only EGL.

+4
source

It looks like you want to render the frame buffer object (i.e. directly to the texture). It is definitely possible. Just do a search for an answer here or on the Internet. I found this one, not too hard. I am not sure if you are using GL ES 1.1 or 2.0.

http://blog.shayanjaved.com/2011/05/13/android-opengl-es-2-0-render-to-texture/

It also looks like APIDemos in the SDK has a sample for 1.1

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/FrameBufferObjectActivity.html

0
source

All Articles