How to Set the Open GLES2.0 to work with the Android Camera?

三世轮回 提交于 2019-12-08 12:58:08

问题


In My Android Camera Application i want to Set some Effect on the Android Camera Preview witht the Help of OPEN GL vertex shader and fragment shader.

Is there any example or source code to use the Android camera with Open GLES effect ? ?

I have seen this. But I want android camera effect in Only One SurfaceView not on another.

Thanks.


回答1:


I've done something similar. But the code is quite messy, it was just a prototype. Check it on my github https://github.com/Jaa-c/PDA-Lupa/tree/master/src/pda/lupa. Preview from the camera is displayed via OpenGL in MyGLSurfaceView, but only in greyscale, because it's to slow to convert colors. But it doesn't use shaders, since it was using only ES 1.1.

Than there is one of my answers on similar topic here: Apply custom filters to camera output. It descibes some possible ways to manually display camera preview in android.



来源:https://stackoverflow.com/questions/7962520/how-to-set-the-open-gles2-0-to-work-with-the-android-camera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!