Well ...I had a patch with multiple rendering context ( one of them used as the main rendering context ..so with a jit.window visible ) .I used invisible contexts ( with usetexture , to_texture messages ) to capture the content of those invisble contexts ..Another way to achieve that ?
You can render to texture. jit.gl.texture @capture. Most likely this
will be more efficient as you won't have the overhead of multiple
windows/contexts and it will draw directly to the texture instead of
having to copy the framebuffer of the window to the texture. Search
the forums for render to texture. There are tons of threads on this
On Fri, Apr 25, 2008 at 2:31 AM, pascal wrote:
> Well ...I had a patch with multiple rendering context ( one of them used as the main rendering context ..so with a jit.window visible ) .I used invisible contexts ( with usetexture , to_texture messages ) to capture the content of those invisble contexts ..Another way to achieve that ?
this is a n answer to the instancing gridshapes question above.
please check that you respond to the correct thread or start a new thread if your topic is new.
Chuck, you're doing a number of things inappropriately in your patch. FIrst, I'd change the method you use with the oscillators. If you want to use audio signals check out jit.poke~ and how to write to msp buffers~. For example, you can write your x,y,and z position values to a buffer called 'scale' and then access these values from a matrix with the same name by banging the matrix and using jit.iter. I think Andrew Benson gave a good example of doing this in one of his jitter recipes (which are available on the cycling site).
A number of your messages are incorrectly formatted. erase_color is followed by 4 values; lighting_enable takes one value (0 or 1). if you want to alter the values you could use the $1 argument (and $2 $3 $4 etc) in your messages.
One of the reasons you can't move about in the space is because you are only ever drawing one gridshape and not erasing the buffer before rendering the next frame. To get the trace you are after you will need to draw more than one object each frame, and jit.gl.multiple may help you here - have a look at it's help file and you'll see that you can view the objects from different angles which you are not able to do with your example.
I'd also suggest looking into the doublebuffer setting for your window.
> leaves a 2D trail of the instancing history. I want to be able to
> leave a 3D trail of shapes so I can move the camera and be able to
> view the 3D trail/cluster while it is forming.
well, not quite. it's not leaving an "instancing history" if i understand your term correctly. it's just leaving trails of what was previously drawn to the buffer, because your erase_color alpha is 0. your correct that this is just in 2d. it's just pixels, not 3d geometry.
you will have to come up with something of your own in order to do what you want. gl.multiple might be a good place to start, but it's not necessary. a gl.gridshape object encapsulated in a poly~ might also be a good place to start.