Jerky gridshape position

I’m trying to make a very simple OpenGL task, which is to move a rectangle (a jit.gl.gridshape) from side to side of my rendering space. The problem is that I can’t make it very clean. Even if the framerate keeps around 60, the motion of the gridshape is jerky…

Anyone has an idea about how to optimize this?

After this is solved, I want to use it in a very more complex way, so I need this simple movement to be clean.

Thanks a lot!

– Pasted Max Patch, click to expand. –

Copy all of the following text. Then, in Max, select New From Clipboard.

I’m trying to make a very simple OpenGL task, which is to move a rectangle (a jit.gl.gridshape) from side to side of my rendering space. The problem is that I can’t make it very clean. Even if the framerate keeps around 60, the motion of the gridshape is jerky…

Anyone has an idea about how to optimize this?

qmetro 2 is insane, this is asking way too much ("500 fps") and it’s just not going to happen…and everything gets jumpy because the processor is trying to keep up. I tried qmetro 20 and things got a lot smoother, plus the UI feedback (cursor) was way more responsive. so, only ask for as many rendering frames as you really want in the output, in this case, 50, which is very smooth.

I think the "fps 60" that you get with qmetro 2 is misleading, there’s a ton of droppage there in the actual output. try qmetro 20 and you’ll get 50 "real" fps.