[android-developers] OpenGL ES loading textures after onSurfaceChanged

2009-12-05 Thread Shaka
Hi! I'm using GLSurfaceView for one of my applications and I've encountered a problem. It seems I can only create textures when in onSurfaceChanged, after that glGenTextures only returns 0. I've tried without glGenTextures and keeping track of texture indices myself, but the textures generated jus

[android-developers] Re: How to find out the width of a string when rendered using a certain text appearance?

2009-09-04 Thread Shaka
Dunno if this is the best way to do it but I do it like this. Rect bounds = new Rect(); textPaint.getTextBounds(string, 0, string.length(), bounds); return bounds.width(); On 4 Sep, 00:25, hap 497 wrote: > Thank you. But how can i specify a certain TextAppearance before > calling Paint.getTextW