Movie Camera and OpenGL/shader example?

kcorey

Member
Licensed User
Longtime User
Hi All,

I'd like to combine an image, a mask, and video input from the camera (all joined together in a shader I've written) and display the result using OpenGL to the screen. Note that I'm looking to display the result, not the preview.

In essence, I want the screen to simulate the surface of something shiny (the image), and the mask is used by the shader to decide which part is shiny, and which part isn't. The video feed is sampled in the shiny bits depending on how shiny it is.

I know it sounds crazy...but I had it 99% working on the iPad...until it dies with a memory panic...and the OS started deleting my objects. Even Apple couldn't figure it out as it was using an undocumented call, so I quit working on it.

The Apple/Samsung farce was a step too far for me, so Apple can keep their App Store. I'd like to port this over to Android.

So, back to the original question:
1) I see I can get a copy of the data with the _preview event handler of the camera...is there a way to only get the preview data, but /not/ show it on the screen?

If I can, great, the GL2 Type has glAttachShader, which I presume means I could attach the shader, so that the heavy lifting of combining the images and the preview could be done in hardware.

I don't care about 3D at all, that's not the point. If I have to I'll make a single polygon the size of the screen and display that.

Anyone actually have an example of using GL2's shaders from within B4A (or even from Java, for that matter...)?

-Ken
 
Top