[android-developers] Re: Multiple Texture Issues on OLGES20
Steve,
Have you tried the following?
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textures[0]);
GLES20.glActiveTexture(GLES20.GL_TEXTURE1);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textures[1]);
I think that's what you're missing.
On Aug 4, 1:51 pm, Steve Dorado <stdo...@gmail.com> wrote:
> Has anyone successfully accessed multiple textures in fragment shader
> on OGLES20 (Froyo + Nexus one)???
>
> A few strange observations:
>
> GLES20.glGenTextures(2, textures, 0);
> to create 2 textures returns array of [1,2] vs [0,1]
>
> ....
> GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureID);
> Does not seem to work and keeps texture 0 as the active texture
>
> as supported by:
> GLES20.glUniform1i(sTextureHandle, textures[0]); //Where textures[0]
> == 1 as returned by glGenTextures does not work, but when 0 is passed,
> all is ok (other than no ability to use a second texture)
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home