androidCameraExample does not work with the ofGLProgrammableRenderer

Using the androidCameraExample of the 0.8.1 release on a Nexus 5 works well with the normal renderer, but does not work with using the ofGLProgrammableRenderer.

Can someone please guide me on how to make it work with the ofGLProgrammableRenderer?

the camera in android uses a special type of texture and when using shaders it needs a special declaration in the fragment to be able to use it, we might need to add a new shader to the programmable renderer for android to use this kind of textures

Thanks Arturo.

If you point me in the right direction (texture type and shader) I will give it a try and attempt a fix in the OF code.

the texture target is GL_TEXTURE_EXTERNAL_OES and the type of sampler needed in the shader samplerExternalOES as a quick fix you can use your own shader when drawing the video. if you want to submit a PR to fix it i think you need to look for the target when the texture is binded and use the correct shader program, we already do that in desktop for ARB vs 2D textures so it should be relatively easy to fix

also be aware that not all devices will use this texture so if you are doing an app that needs to work across several devices you’ll need to check the target of the texture