gl shared context nightmare
Dear list,
I've made this rutt etra patch that I want to key ontop of a database visualization that I've made. The data visualization takes place in an mxj and is drawn to a different gl render context which is captured to a texture so I can post process it and then luma key it with slabs. However instead of the data visualization appearing keyed over the top I get a squashed copy of the texture I'm colouring the rutt etra with.
When I connect a jit.matrix and jit.pwindow to check what's in the texture I'm capturing the data visualization to I can see my visualization fine. The output of this texture is fed into a blur slab and when I check the output of this I see the squashed texture from somewhere else in the patch.
I've successfuly used a shared context to share a texture in a stripped down version of the patch and processed the output texture but it seems to go haywire when I try and use the technique with so many other textures.
Has anyone else experience a problem like this ?
here is a cut down version of the patch, i've included the classes and source for the java mxj, just drop them in Cylcing '74/java/classes . When you open it it'll ask you for a video to play, then hit space bar to get it rendering and look in the subpatch called render-data-overlay, I've left the jit.pwindows doing the texture readback in there so you can see what I'm talking about.
Hope someone has an idea because right now I'm stumped.
The only work around I've been able to find is to dump the texture to a matrix and then back out into another texture, this seems stupid. What's the clever way to do this?