Cross fading two jit.windows with opengl content

Sam Sturtivant's icon

Hi, I was wondering if anyone could help me cross fade between two jit.windows with openGL content. jit.xfade doesn't work for this. I have uploaded the patch.

4996.mod1.maxpat
Max Patch
Rob Ramirez's icon

unless you are outputting to two distinct video cards, you don't want to use to jit.windows.

if you are, then you should enable @shared 1 on both windows, and capture your scene to a texture using jit.gl.node @capture 1.
you can crossfade the textures using jit.gl.pix @gen xfade.

search the forums for more info on these techniques.

Sam Sturtivant's icon

Hi Rob, thanks for the reply. I've tried for the last five hours to capture both scenes to texture object jit.gl.node @capture 1 by enabling @shared 1 on both jit.windows. The jit.gl.pix @genxfade isn't working. Any more help would be greatly appreciated as this is for a university project.

Rob Ramirez's icon

well, you're going to have to give some more info about what's not working, and preferably post a patch showing what you've done.

you're going to want to start very simple, two render contexts, each with a single object and a jit.gl.node capturing to texture.

i'm also not entirely sure what you're trying to achieve, so it's hard for me to recommend proper strategies.
what do you want to do with each scene's captured texture? are these supposed to be crossfaded on a third window?

Sam Sturtivant's icon

Sorry for being Vague,I wish to crossfade them on a third window . Heres the patch, read in a movie file into the 2nd window to see the two windows working.

5019.edit.maxpat
Max Patch