Forums > Jitter

How do you clone jit.window ??

November 10, 2010 | 7:07 pm

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?


November 10, 2010 | 8:55 pm

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

November 10, 2010 | 9:01 pm

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

November 10, 2010 | 9:09 pm

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.

November 11, 2010 | 4:30 am

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. —
November 11, 2010 | 11:57 am

Oooh cheers!

November 11, 2010 | 1:28 pm

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

November 11, 2010 | 11:02 pm

Thanks for the trick!

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

Forums > Jitter