Forums > Jitter

videoplane or texture to matrix?

September 5, 2013 | 1:20 pm

So I expected this to be easy but I can’t figure it out. It seems that @matrixout just sends geometry. What is the best way to get this to a matrix so that I can syphon it out??

<code>

– Pasted Max Patch, click to expand. –

</code>


September 5, 2013 | 2:35 pm

I adapted your code:

<code>

– Pasted Max Patch, click to expand. –

</code>

and added a jit.gl.node, and a jit.gl.camera to capture to a texture. from here it should be easy to pass it via syphon.


September 5, 2013 | 6:58 pm

Great! Thanks.


September 8, 2013 | 3:55 am

actually I just discovered another object that helps with this: jit.gl.asyncread

this acutally gives you a matrix, while the above gives you a texture. for your case the above code should be better, since your captured texture stays on the GFX card and is beeing passed directly to syphon, which is using a kind of shared GFX-Texture (I think) instead of passing it to CPU (matrix) and then to GPU (texture again) and Syphon.


September 8, 2013 | 9:01 am

Oh man that’s great!
One weird issue… when I fullscreen it goes SLOW for some reason.

<code>

– Pasted Max Patch, click to expand. –

</code>

only when using the asyncread.


September 9, 2013 | 11:42 am

asyncread is always going to be slower, especially for large window sizes.
best to stay in GPU domain and process with gl.slab and gl.pix.


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