Android 3D view overlay on Camera view

来源:互联网 发布:阿里云应用引擎 编辑:程序博客网 时间:2024/05/21 18:46

I got this problem for a long time already. finally i got the solution.

 

 

1.must used the layout to do the overlay

eg:

FrameLayout frame = new FrameLayout(this);

frame.addView(glSurface);
frame.addView(mCameraView);

setContentView(frame);

 

2.must add on the "TRANSLUCENT" for the surface;

glSurface.getHolder().setFormat(PixelFormat.TRANSLUCENT);

 

 

there is a example in the android simple code, called "translucent GLSurfaceView".

that helps a lot.

 

 

原创粉丝点击