Copy contents of Jit.window to a matrix

Sep 6, 2008 at 2:58pm

Copy contents of Jit.window to a matrix

Hi,

I have been making a drawing input system based on Nesa’s patch demonstrated on forum post:

http://www.cycling74.com/forums/index.php?t=msg&th=35452&start=0&rid=3286&S=be2fab5a58a678c7a7a4999fa7b2c23e

This works by simply not erasing previous renders so that movement of a .gl object draws on the screen.

What I want to do is export the resulting image from a Jit.window to file.

I know that this can be done if the drawing is done directly to a matrix which then outputs to the Jit.window for the display, and then send the message – exportimage to save the file, but at full screen the potentially large 4 char matrix greatly affects performance.

It would be better for only the final drawing to be sent to the matrix so that it can be exported and the rendering done direct to the jit.window.

My initial thoughts were to simply change the render destination but this doesn’t transfer over the what has already been rendered.

Does anybody have any ideas how to do this?

Cheers

Andy

#39586
Sep 6, 2008 at 5:25pm

integrate the following into the patch.

basically you use gl.render’s to_texture message to capture to a texture. then you use gl.texture’s tomatrix message to render the texture to a matrix.

– Pasted Max Patch, click to expand. –
#139525
Sep 6, 2008 at 6:39pm

also, check out the helpfile for jit.gl.asyncread. It was made
explicitly for copying OpenGL (i.e. jit.window) output directly to a
matrix at a high framerate.

wes

On Sat, Sep 6, 2008 at 10:25 AM, Robert Ramirez wrote:
>
> integrate the following into the patch.
>
> basically you use gl.render’s to_texture message to capture to a texture. then you use gl.texture’s tomatrix message to render the texture to a matrix.
>
>

– Pasted Max Patch, click to expand. –

>
>
>

#139526

You must be logged in to reply to this topic.