如何设置打开GLES2.0与Android相机工作? [英] How to Set the Open GLES2.0 to work with the Android Camera?

查看:141
本文介绍了如何设置打开GLES2.0与Android相机工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid摄像头应用程序我想设置在Android相机preVIEW witht OPEN GL顶点着色器和片段着色器的帮助一定的效果。

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.

有没有例子或源$ C ​​$ C使用Android摄像头,支持开放GLES的效果呢? ?

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

我见过这个。但我想只有一个SurfaceView的Andr​​oid相机效果没有其他。

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

感谢。

推荐答案

我已经做了类似的事情。但是,code是相当混乱,这只是一个原型。检查它在我的github上 https://github.com/ JAA-C / PDA-卢帕/树/主/ src目录/ PDA / LUPA 。从相机preVIEW在MyGLSurfaceView通过OpenGL显示出来,但只在灰度,因为它是慢转换颜色。但因为它仅使用ES 1.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.

相比,还有我在这里类似题目的答案之一:<一个href=\"http://stackoverflow.com/questions/8371055/apply-custom-filters-to-camera-output/8372731#8372731\">Apply自定义过滤器摄像机输出。它descibes一些可能的方式来手动显示在相机的android preVIEW。

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.

这篇关于如何设置打开GLES2.0与Android相机工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆