[android-developers] Re: write tag with opengl on android

2011-03-22 Thread Lance Nanek
I just draw a character at a time, so I can draw anything. I use char[] instead of String so I can preallocate and avoid garbage collection. You asked for code, so here it is. Mine's horrendously ugly, but I wrote it once and it never needed much revising, so I never really needed to clean it up.

Re: [android-developers] Re: write tag with opengl on android

2011-03-22 Thread a a
sorry, it seams better and light to use canvas to draw the text on the bitmap. anyway, thanks for your help. 2011/3/22 Lance Nanek lna...@gmail.com: I just draw a character at a time, so I can draw anything. I use char[] instead of String so I can preallocate and avoid garbage collection. You

[android-developers] Re: write tag with opengl on android

2011-03-22 Thread Lance Nanek
Depends on your use case. In my case I was rendering UI and scores in full screen OpenGL games. The scores changed frequently, so rendering them to a bitmap and uploading that as a texture would be terrible for the frame rate compared to never having to change the textures. Similarly, overlaying

[android-developers] Re: write tag with opengl on android

2011-03-21 Thread Nightwolf
If text is static then you need texture (picture) with label Dog, apply it to a quad (two triangles that form up a rectangle). On Mar 21, 11:48 am, a a harvey.a...@gmail.com wrote: Hi all,   How can i write a tag like string Dog on the picture. Can anyone paste his/her code on here? -- You