Forums > Jitter

efficiency – using multiple .text2d objects

February 3, 2008 | 6:18 pm

Hello I’m looking for some advice on making my patch more efficient. I have been using max/msp for a few years but have only just started using Jitter and my understanding of it is quite limited.

I’m using around 60 jit.gl.text2d objects contained within MSP’s poly~ object. Each object renders a different word to the same jit.pwindow on which the user can click and drag words and resize them.

I have the thing working but was wondering if there is a way to get a higher frame rate. Perhaps there is a better way than using a separate it.gl.text2d for each word? The help file shows a tantalising example of how to use a single object to display mutliple items per frame but i have been unable to get it to word for me. Would this help the frame rate?

Any advide or example code would be much appriciated,

Thanks,

John.


February 3, 2008 | 6:33 pm

And here is my patch.


February 3, 2008 | 7:01 pm

hi John, the trick with the single-object-multiple-rendering is that you
have to stuff all its alternating states between the [t b erase] of the
jit.gl.render.
you see, jit.render will not output a screen refrash if not given a bang, so
any valid opengl object you stuff into it between the erase and bang will be
stored and outputted in time.
[t b b erase]
| | |
| jit.gl.text |
|____________|
|
jit.gl.render
you have to have your gl object set to @automatic 0 so it will not auto add
to render Que, only when it receives a bang. you can then give the same
object many diffrent states and it will go to the same rendering context.
that said, im not sure its more efficient or not. experiment.

this is the explanation floating in my head, it can be put better and there
are some finer details to this then i gave. also drawing ascii-patches is a
bitch!

On Feb 3, 2008 8:33 PM, Leafcutter John

wrote:

> And here is my patch.
> –
> http://www.leafcutterjohn.com
>
> "The Forest And The Sea"
> Out on Staubgold Records
> Staubgold 68 CD/LP
>
>
>


February 3, 2008 | 7:05 pm

you can also try the jit.gl.mutliple with the text object.

On Feb 3, 2008 9:01 PM, yair reshef wrote:

> hi John, the trick with the single-object-multiple-rendering is that you
> have to stuff all its alternating states between the [t b erase] of the
> jit.gl.render.
> you see, jit.render will not output a screen refrash if not given a bang,
> so any valid opengl object you stuff into it between the erase and bang will
> be stored and outputted in time.
> [t b b erase]
> | | |
> | jit.gl.text |
> |____________|
> |
> jit.gl.render
> you have to have your gl object set to @automatic 0 so it will not auto
> add to render Que, only when it receives a bang. you can then give the same
> object many diffrent states and it will go to the same rendering context.
> that said, im not sure its more efficient or not. experiment.
>
> this is the explanation floating in my head, it can be put better and
> there are some finer details to this then i gave. also drawing ascii-patches
> is a bitch!
>
> On Feb 3, 2008 8:33 PM, Leafcutter John

> wrote:
>
> > And here is my patch.
> > –
> > http://www.leafcutterjohn.com
> >
> > "The Forest And The Sea"
> > Out on Staubgold Records
> > Staubgold 68 CD/LP
> >
> >
> >
>


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