There is an Api demo showing how arbitrary views can be positioned on top of a SurfaceView, if you want a true overlay.
On Tue, Dec 2, 2008 at 2:42 AM, fcalzada <[EMAIL PROTECTED]> wrote: > > Hi petunio, > > you said "I managed (after a lot of problems) to put 2D graphics on > top of 3D." > I'm trying hard to do the same, and i don't find a solution. > how did you do ? > > thanks a lot > > On Nov 27, 3:09 pm, petunio <[EMAIL PROTECTED]> wrote: > > Hi all > > > > does anybody know what am I doing wrong? > > > > I managed (after a lot of problems) to put 2D graphics on top of 3D. > > But the 2D graphics are flickering... > > > > this is the main loop: > > > > public void drawFrame(GL10gl, my3DObject world, Canvas myCanvas) > > { > > gl.glClear(GL10.GL_COLOR_BUFFER_BIT |GL10.GL_DEPTH_BUFFER_BIT); > > gl.glClearColor(0, 0, 0, 1); > > > > world.draw(gl); //draws the 3D world, it works... > > > > drawIcons(myCanvas); //draws the 2D graphics. the > > ones that are flickering... > > > > mEgl.eglSwapBuffers(mEglDisplay, mEglSurface); > > > > } > > > > Also, in the SurfaceCreated method I obtain the canvas, by doing: > > myCanvas=mHolder.lockCanvas(); > > and then, when the surface is destroyed, I do: > > mHolder.unlockCanvasAndPost(myCanvas); > > > > Any help would be very appreciated > > Thanks! > > > -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---