I've been looking at this lately, on the Android platform. Summing up the various options and why they are/aren't applicable.

glReadPixels()

The only option Android Java coders currently really have. Said to be slow. Reads from a framebuffer, not a texture (so one must render the texture to an internal frame buffer first, unless one wants to record the screen itself). Okay. Got things to work.

EGL_KHR_image_base()

An extension that seems to be available on the native (NJK) level, but not in Java.

glGetTexImage()

Looked promising but not available in OpenGL 2.0 ES variant.

Pixel Buffer Objects

Probably the 'right' way to do things, but requires OpenGL 3.0 ES (i.e. selected Android 4.3+ devices).

I'm not saying this is adding any info that wouldn't be available elsewhere. But having so many seemingly similar options (that still wouldn't work) was confusing. I'm not an OpenGL expert so any mistakes above are gladly corrected.

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐