[android-developers] Re: creating a canvas based on OpenGL
Please note that this feature is experimental, with bugs, limitations and no support currently. On Sun, Feb 15, 2009 at 10:01 AM, johnburkert.babar...@gmail.com wrote: > > i am interested in this also, but haven't spent any time on it. just > some thoughts... are you making all the usual gl calls? like clearing > your buffers, setting up your view and projection, enabling textures > and then flipping the buffer at the end... repost if you find any > resolution. > > On Feb 13, 7:20 pm, petunio wrote: >> Hi >> >> I am writing an application that uses both 2D and 3D. >> >> For the 3D part I use OpenGL, and for the 2D part, I do: Drawable.draw >> (myCanvas); >> >> There is a desynchronization between them >> I have heard that you can create a Canvas based on OpenGL, and then >> when I draw into that canvas, it is redirected to the opengl >> surface... >> >> something like this: >> >> if (GL != null) >>myCanvasGL=new Canvas(GL); >> >> and then, when I use Drawable.draw(myCanvasGL); >> that drawable should be drawn into the opengl surface... >> >> I must be missing something, because all I can see is a frustrating >> black screen... >> >> any ideas, please... > > > > -- Romain Guy Android framework engineer romain...@android.com 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: creating a canvas based on OpenGL
also, are you calling canvas.setViewport()? On Feb 13, 7:20 pm, petunio wrote: > Hi > > I am writing an application that uses both 2D and 3D. > > For the 3D part I use OpenGL, and for the 2D part, I do: Drawable.draw > (myCanvas); > > There is a desynchronization between them > I have heard that you can create aCanvasbased on OpenGL, and then > when I draw into thatcanvas, it is redirected to the opengl > surface... > > something like this: > > if (GL!= null) > myCanvasGL=newCanvas(GL); > > and then, when I use Drawable.draw(myCanvasGL); > that drawable should be drawn into the opengl surface... > > I must be missing something, because all I can see is a frustrating > black screen... > > any ideas, please... --~--~-~--~~~---~--~~ 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: creating a canvas based on OpenGL
i am interested in this also, but haven't spent any time on it. just some thoughts... are you making all the usual gl calls? like clearing your buffers, setting up your view and projection, enabling textures and then flipping the buffer at the end... repost if you find any resolution. On Feb 13, 7:20 pm, petunio wrote: > Hi > > I am writing an application that uses both 2D and 3D. > > For the 3D part I use OpenGL, and for the 2D part, I do: Drawable.draw > (myCanvas); > > There is a desynchronization between them > I have heard that you can create a Canvas based on OpenGL, and then > when I draw into that canvas, it is redirected to the opengl > surface... > > something like this: > > if (GL != null) > myCanvasGL=new Canvas(GL); > > and then, when I use Drawable.draw(myCanvasGL); > that drawable should be drawn into the opengl surface... > > I must be missing something, because all I can see is a frustrating > black screen... > > any ideas, please... --~--~-~--~~~---~--~~ 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: creating a canvas based on OpenGL
Have you set bounds before the draw? a drawable will not draw unless set bounds has been called. On Feb 13, 8:20 pm, petunio wrote: > Hi > > I am writing an application that uses both 2D and 3D. > > For the 3D part I use OpenGL, and for the 2D part, I do: Drawable.draw > (myCanvas); > > There is a desynchronization between them > I have heard that you can create a Canvas based on OpenGL, and then > when I draw into that canvas, it is redirected to the opengl > surface... > > something like this: > > if (GL != null) > myCanvasGL=new Canvas(GL); > > and then, when I use Drawable.draw(myCanvasGL); > that drawable should be drawn into the opengl surface... > > I must be missing something, because all I can see is a frustrating > black screen... > > any ideas, please... --~--~-~--~~~---~--~~ 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---