multiple gridshapes/videoplanes within one drawing context/jit.window

Dec 19, 2009 at 7:51pm

multiple gridshapes/videoplanes within one drawing context/jit.window

i’m sure this is simple, i’m not very experienced with jitter, i’m just confused as to the naming protocols of jit.gl.render/jit.gl.gridshape/jit.gl.videoplane and how to put two into one window if the names have to be the same to transfer the data.

#47303
Dec 19, 2009 at 11:04pm

You don’t need to “name” the gridshapes, just have multiple jit.gl.gridshape objects that draw to the same jit.gl.render, which does need a name. So the gridshape objects draw into the named jit.gl.render context. Same for the videoplanes.

jit.gl.render foo

has within it

jit.gl.gridshape foo @shape sphere
jit.gl.gridshape foo @shape cylinder
etc…
each are unique objects in the single jit.gl.render scene.

#170192
Jun 19, 2010 at 7:28pm

I’m having this problem too. I have multiple shapes in the same named drawing context. When I scale, position or rotate them, the new positions do get drawn but the old ones don’t get erased. It’s not until I esc-fullscreen that the window displays (what I think) should be there. Here’s what i mean…

– Pasted Max Patch, click to expand. –
#170193
Jun 19, 2010 at 7:41pm

this works for me:

– Pasted Max Patch, click to expand. –
#170194
Jun 19, 2010 at 8:40pm

you have only provided 3 values for your gl.render’s erase_color attribute, therefore the fourth value defaults to 0. this fourth value is alpha, and setting to 0 basically means nothing is erased.
set your erase_color to 1. 1. 1. 1.

#170195

You must be logged in to reply to this topic.