[android-developers] Re: What is the best way to implement dynamic textures in OpenGL ES?

2009-07-04 Thread Bruce
Thanks for the tips, much appreciated! I'll try the other approach to avoid the pixel buffer stuff. My biggest problem was I was attempting this from another thread and it wasn't doing anything. On Jul 4, 1:26 pm, gjs garyjamessi...@gmail.com wrote: Hi Tom, Thanks for the suggestion about

[android-developers] Re: What is the best way to implement dynamic textures in OpenGL ES?

2009-07-03 Thread MrChaz
As I understand it glBindTexture() sets the active texture by it's Id and glTexImage2D() fills whatever the active texture is with the contents of the buffer so recalling that ought to change the texture On Jul 2, 6:52 am, Bruce Rees baree...@gmail.com wrote: Hi All, I have a texture-mapped

[android-developers] Re: What is the best way to implement dynamic textures in OpenGL ES?

2009-07-03 Thread Tom Gibara
Also you can use glTexSubImage2D() if only a portion of your bitmap is changing. For these sorts of operations android.opengl.GLUtils will be *much* more efficient (and simpler) than your current approach of populating a ByteBuffer since the native helper methods can access the Bitmap pixel data

[android-developers] Re: What is the best way to implement dynamic textures in OpenGL ES?

2009-07-03 Thread gjs
Hi Tom, Thanks for the suggestion about GLUtils. I went back found that the TriangleRenderer.java example had been updated some time ago to use this method which is as you say is *much* more efficient (faster) simpler than using a ByteBuffer and doing the color conversions. ( It pays to