Optimization Recomendations

Nov 21, 2008 at 1:33am

Optimization Recomendations

Does anyone have time to see if there is any way to optimize the frame rate on this patch. I’ve got the jit.gl.multiple object creating 9216 gl plane objects. The color of each plane is then dynamically changed by updating “setcell” messages sent to the matrix that controls the plane color.

I have a 17inch Macbook Pro with a core 2 duo 2.6 GHz, 4 gb of ram, GeForce 8600M GT.

I only get about 8 fps on this patch, seems like I should be able to do much better than that.

Any suggestions? (Turn on the audio before you turn on the qmetro).
THank
Casey Farina

– Pasted Max Patch, click to expand. –
#40961
Nov 21, 2008 at 2:48am

On Nov 20, 2008, at 5:33 PM, casey Farina wrote:

>
> Does anyone have time to see if there is any way to optimize the
> frame rate on this patch. I’ve got the jit.gl.multiple object
> creating 9216 gl plane objects. The color of each plane is then
> dynamically changed by updating “setcell” messages sent to the
> matrix that controls the plane color.

I don’t have time to look at the patch, but I can advise you that 9216
GL objects is a lot. Each GL object takes some time to set up—with
thousands of simple objects this may add up to more time than the
actual drawing. A faster way to draw a lot of quads might be to use
one jit.gl.mesh object with a GL_QUADS draw_mode. You can change the
color of each vertex in the mesh to make each quad a different color.

-Randy

#145397
Nov 24, 2008 at 9:07pm

Unless you’re going to be manipulating the positions of these planes, you could easily just use a single textured plane to display the color squares. Just use jit.gl.texture @filter nearest to prevent interpolation. If you really need this many quads, I suggest you look at the Jitter Recipe called Shatter, which shows a way to generate a bunch of quads using jit.gl.mesh, which is probably the most efficient way available.

Andrew B.

#145398

You must be logged in to reply to this topic.