How do you clone jit.window ??

Nov 10, 2010 at 7:07pm

How do you clone jit.window ??

Hi guys,

I need to create an exact copy of my jit.window. I push one out to a projector screen but need one on my laptop screen to monitor what’s going on.

Any ideas?


Nov 10, 2010 at 8:55pm

Create another jit.window object and send the same data to it.

Nov 10, 2010 at 9:01pm

Fine for matrix stuff, but what about GL? Can you write to two different windows?

Nov 10, 2010 at 9:09pm

As far as I know, you’d have to duplicate your rendering objects. Put everything into a sub-patch and make a copy rendering to a different named destination. There may be a better way though, I am not sure.

Of course, a simpler way to solve this particular dilemma would perhaps be to just mirror the two displays in system settings, as long as you didn’t need to be able to see any other controls or information on the laptop screen.

Nov 11, 2010 at 4:30am

for opengl you can use a shared_context.
one way is to capture your scene to a gl.texture (using gl.sketch can help with this), then create two gl.videoplanes, one on the main context and one on the shared context. pass your capture texture to both videoplanes.

here is a basic example:

– Pasted Max Patch, click to expand. –
Nov 11, 2010 at 11:57am

Oooh cheers!

Nov 11, 2010 at 1:28pm

Thanks guys, this has been very helpful. Here’s a link to what i’ve been doing.

Nov 11, 2010 at 11:02pm

Thanks for the trick!


You must be logged in to reply to this topic.