简体   繁体   中英

Android OpenGL image processing - without SurfaceView

I want to do some background image processing using OpenGL ES 2 and shaders, but no drawing to a surface (ie off-screen rendering to framebuffers only). While I've already done so on iOS, I'm struggling with this on Android.

I think I'm close to creating a working OpenGL context, but haven't figured out how to do so without a SurfaceView.

Have a look at this gamedev post (click on expand to view the complete code). The code creates a GL context and uses the GLSurfaceView.Renderer interface to appropriately allow to write a renderer. On calling getBitmap() , the renderer is called to draw a frame, which is then read back and converted to a Bitmap.

Note that there is a featured question , which might interest you, too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM