在相机预览应用程序示例中使用 GLSurfaceView 而不是 SurfaceView

发布于 2024-12-26 03:26:17 字数 263 浏览 4 评论 0原文

我正在尝试使用 GLSurfaceView 而不是带有相机应用程序的普通 SurfaceView。该应用程序只是在表面视图对象上显示相机预览帧。它可以工作,但由于我想在相机预览帧上添加 opengl es 渲染,所以我首先扩展 GLSurfaceView 类而不是 SurfaceView。就这样。该应用程序似乎可以工作,但有时它会多功能(如果我按后退按钮,应用程序将不再退出)并且它总是退出并出现错误(当我关闭它时,会出现一个警告框,上面写着:“应用程序由于意外错误而中断”)。

有什么想法吗?

I am trying to use a GLSurfaceView instead of a normal SurfaceView with a camera application. The app simply display the camera preview frame on a surfaceview object. It works, but since i want to add opengl es rendering on the camera preview frame, i started by extending a GLSurfaceView class instead of a SurfaceView. Just that. The application seems to work, but sometimes it mulfunction (the app don't exit anymore if i press the back button) and it exit always with an error (when i close it, appears an alert box that says something like: "the app was interrupted due to an unexpected error").

Any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文