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?

Thanks

#53245
Nov 10, 2010 at 8:55pm

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

#191318
Nov 10, 2010 at 9:01pm

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

#191319
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.

#191320
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. –
#191321
Nov 11, 2010 at 11:57am

Oooh cheers!

#191322
Nov 11, 2010 at 1:28pm

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

http://vimeo.com/15165903

#191323
Nov 11, 2010 at 11:02pm

Thanks for the trick!

#191324

You must be logged in to reply to this topic.