Fastest way to send OpenGL instructions (jit.gl.sketch)?

Feb 6, 2006 at 12:15pm

Fastest way to send OpenGL instructions (jit.gl.sketch)?

Hi there,

I am trying to animate a large amount of sprites using jit.gl.sketch. I am wondering what’s the best way to do this. The amount of gl instructions I want to send to the sketch-external go into the ten thousands and this seems to be a bit of a bottle neck within max.

An mxj external is very slow when it comes to sending messages.Even though a c-external is considerably faster, the whole conversions going on between the outlets of the c-external and the inlet of the sketch external seems to use quite a bit of CPU performance and slows things down.

Just as an example I animated 500 sprites (videoplanes). With a c-external I managed to get to 30FPS. I did the same thing in processing (java with opengl) and managed to get 60FPS. Both on Apple Aluminium 1.5Ghz and 128MB Radeon ATI graphics card.

Any suggestions to speed things up in Jitter? Is there possibly a better way to send OpenGL instructions?

Cheers

Mark

#24292
Feb 6, 2006 at 7:46pm

try using jit.gl.mesh instead of jit.gl.sketch.

-Randy

#70021
Feb 7, 2006 at 12:54am

Can you post examples?
It’s hard to tell what you’re doing. there are many ways to manipulate
500 “sprites”…

-evan

#70022
Feb 10, 2006 at 12:24am

Hi there, sorry for late reply. You can download an example (OSX) from here: http://www.nurons.net/sprites_test.zip

The patch contains a simple c external that sends a series of gl-commands out of its left outlet.

I am quite a newby to writing c-externals and haven’t had a chance yet to look at the Jitter-SDK. Any idea whether it would be possible to send gl-commands directly from the c-external to a gl-render-context?

#70023

You must be logged in to reply to this topic.