简体   繁体   English

如何使用GLSurfaceView.Renderer打开相机

[英]How to open camera with GLSurfaceView.Renderer

I'm trying to build a camera view as background. 我正在尝试将相机视图构建为背景。 I want to load my camera inside GLSurfaceView.Renderer class. 我想将相机加载到GLSurfaceView.Renderer类中。

My class: 我的课:

public class ModelRenderer implements GLSurfaceView.Renderer {
...

My question is, is it possible to load camera preview as background in GLSurfaceView.Renderer ? 我的问题是,是否可以在GLSurfaceView.Renderer相机预览加载为背景?

I'm using Android studio. 我正在使用Android Studio。

Well It isn't really adding the preview as a "background" but you certainly can draw the camera preview to the GLSurfaceView and attach a renderer to the surface to do the drawing. 好吧,它并不是真正地将预览添加为“背景”,但是您当然可以将相机预览绘制到GLSurfaceView并将渲染器附加到曲面上以进行绘制。 There are numerous examples of doing so. 这样做的例子很多。 I would search around for them but I believe Grafika has what you are looking for. 我会四处搜寻,但我相信Grafika拥有您想要的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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