Yes, you're right.

I had to change the bind calls to this:

GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureID);

Thanks.



On Tuesday, December 4, 2012 6:06:18 PM UTC-6, RichardC wrote:
>
> I don't think your bind texture call is correct see *bold* below:
>
> *"The texture object uses the GL_TEXTURE_EXTERNAL_OES texture target, 
> which is defined by the 
> GL_OES_EGL_image_external<http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt>OpenGL
>  ES extension. This limits how the texture may be used. Each time the 
> texture is bound it must be bound to the GL_TEXTURE_EXTERNAL_OES target 
> rather than the GL_TEXTURE_2D target. Additionally, any OpenGL ES 2.0 
> shader that samples from the texture must declare its use of this extension 
> using, for example, an "#extension GL_OES_EGL_image_external : require" 
> directive. Such shaders must also access the texture using the 
> samplerExternalOES GLSL sampler type."*
> *
> *
> *From:
> *
> http://developer.android.com/reference/android/graphics/SurfaceTexture.html
>
>
> On Tuesday, December 4, 2012 3:13:06 PM UTC, bob wrote:
>>
>> I fiddled with a bunch of approaches for binding.  The current code looks 
>> like this:
>>
>> int[] textures = new int[1];
>> GLES20.glGenTextures(1, textures, 0);
>> mTextureID = textures[0];
>> GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureID);
>>
>> GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER,
>>                 GLES20.GL_NEAREST);
>> GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D,
>>                 GLES20.GL_TEXTURE_MAG_FILTER,
>>                 GLES20.GL_LINEAR);
>> GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S,
>>                 GLES20.GL_REPEAT);
>> GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T,
>>                 GLES20.GL_REPEAT);
>>
>> Statics.st = new SurfaceTexture(textures[0]);
>>
>>
>>
>> On Tuesday, December 4, 2012 3:08:16 AM UTC-6, Fabien R wrote:
>>>
>>> On 03/12/2012 17:50, bob wrote: 
>>> >   
>>> > 
>>> > I actually tried calling it in onDrawFrame, and that yields a slightly 
>>> > different error: 
>>> > 
>>> > 
>>> > 12-03 10:47:23.282: E/SurfaceTexture(2753): [unnamed-2753-0] 
>>> > updateTexImage: error binding external texture image 0x9046042f (slot 
>>> 5): 
>>> > 0x502 
>>> >   
>>> How did you bind your texture ? 
>>> - 
>>> Fabien 
>>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to