Thank you for your answer.

I tried it but didn't work: The openGL was coming on top, but the
camera preview as well on top of the openGL frame.
I looked around and found "mGLSurfaceView.bringToFront();" and it
works fine.
Here is my code now:

mGLSurfaceView = new GLSurfaceView(this);
mPreview = new CameraView(this);
mGLSurfaceView.setEGLConfigChooser(5, 6, 5, 8, 16, 0);
mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
mGLSurfaceView.setKeepScreenOn(true);
mGLSurfaceView.setRenderer(sceneRenderer);
setContentView(mGLSurfaceView);
addContentView(mPreview, new
LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));

mGLSurfaceView.bringToFront();


On 18 fév, 09:20, Lance Nanek <[email protected]> wrote:
> Have you tried the setZOrderMediaOverlay method mentioned in the
> previous threads about 
> this?http://groups.google.com/group/android-developers/msg/2123d7174c70cfa6
>
> On Feb 16, 8:33 pm, Balbouch <[email protected]> wrote:
>
>
>
> > Hello,
>
> > Most of you would think it's this question again... Well, my
> > application run perfectly (shows 3D model rotating with camera in
> > background) on the HTC Magic. But when I try to launch my application
> > on the Droid or the Nexus one, the only thing I can see is the camera
> > preview. If I delete the line when I add the camera preview
> > (addContentView) in my code, the OpenGL part works fine.
>
> > The worse is that sometimes everything working fine. And if I start
> > the application again it doesn't!
>
> > Here is the classic code:
>
> > mGLSurfaceView = new GLSurfaceView(this);
> > mPreview = new CameraView(this);
> > mGLSurfaceView.setEGLConfigChooser(5, 6, 5, 8, 16, 0);
> > mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
> > mGLSurfaceView.setKeepScreenOn(true);
> > mGLSurfaceView.setRenderer(sceneRenderer);
>
> > setContentView(mGLSurfaceView);
> > addContentView(mPreview, new
> > LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
>
> > Do you have any idea where the issue could come from?
> > Thank you in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to