Android - Draw OpenGL image on top of Camera

2019-04-02 23:35发布

问题:

I want to draw an animation 2D/3D with OpenGL ES, which draws on top of camera, can anyone provide me the example. I need this very much.

thanks for helping!

回答1:

You should check this project.

http://code.google.com/p/andar/



回答2:

SurfaceView will not work like regular view. So what you should do is you should wrap the SurfaceView with frame or relative layout. Because both of them supports z-ordering. Create a class extending View and add the above logic in to it. Make an instance of this class in your layout XML. Now this relative or frame layout is ready to expose the drawing..

The following one is very useful. Have a look...

https://github.com/commonsguy/vidtry/



回答3:

it's simple if you have a class which implement surfaceView and add callback to it. this example may be help solve your problems

download this