Copy_texture and Max 6

May 3, 2013 at 2:20pm

Copy_texture and Max 6

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.



May 3, 2013 at 6:13pm

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 at 7:03pm

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, etc.

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



May 3, 2013 at 7:38pm

set the drawing context of all your objects to a named 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 at 11:38am

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



You must be logged in to reply to this topic.