Forums > Jitter

Copy_texture and Max 6

May 3, 2013 | 2:20 pm

Hi all

I’m converting an old project from Max 5 to Max 6, and one of the things I’m struggling with is how to recreate the OpenGL preview features I used in that project. I used to use @shared_context and @copy_texture to copy the full OpenGL buffer from one context to another for a preview window: this worked fine in Max 5, but doesn’t in Max 6. I’m aware of the new ‘shared’ attribute of OpenGL contexts, and have substituted these for the old ‘@shared_context’ method, but can’t get the following to work. Could anybody shed some light on this please?

– Pasted Max Patch, click to expand. –

I’m running Max 6.1.2 on a Macbook Pro Retina 15", OS Mountain Lion.

Cheers

Tom


May 3, 2013 | 6:13 pm

if you’re just sharing textures, there’s no need to do anything other than enable shared on the windows or pwindows.

– Pasted Max Patch, click to expand. –

May 3, 2013 | 7:03 pm

Thanks Rob for your reply.

However, I think I’ve made the example patch too simple to adequately demonstrate what I’m doing in the main project: what I need to do is capture the entire render buffer of one context and use it as a texture in another context: in the example posted I only had one videoplane in the OpenGL scene, but in the real thing I might have dozens of models, multiple video planes, jit.gl.multiples etc.

The Max5 trick of ‘copytotexture’ for a jit.gl.render worked brilliantly, and it is still documented in Max6, so I’m not sure what I’m missing to make it work in Max6.

Cheers

Tom


May 3, 2013 | 7:38 pm

use jit.gl.node.
set the drawing context of all your objects to a named jit.gl.node and set @capture 1.
share that texture output with your preview context and your main context.

search the forum for more examples.


May 4, 2013 | 11:38 am

Thanks Rob. That looks like it will do the trick – I’ll do some investigating.

I’m still curious as to what’s happened to the copytotexture technique, as the documentation doesn’t seem to have changed. But at least I can continue converting my project in the meantime

Tom


Viewing 5 posts - 1 through 5 (of 5 total)