i have a js that creates one render object and sketch object with drawing some triangles in opengl. these are scaling up and down over the time. at startup everything works fine but after some minutes the fps going down and down from 50 to 30 and less. the render gets banged after the drawing command. have anybody a suggestion where the problem is? can it be a memory leg, because calculate the new vertex position is done each time the drawing command is called which is metro 50.
Make sure you send your gl.sketch object reset and flush messages. If you don’t, the render queue just gets longer and longer and you’ll see performance go down. It’s not actually a JS problem, it’s a GL issue that is being improperly handled.
In my experience this is the first thing to check.
that is not the problem, i reset the sketch object befor each drawing, to clear the command list.
i figured out that is a strange behavior between max5 and max6. in max5 it runs like expected and in max6 it runs in an memory leak.
i rebuild the script now and test each function furthermore i will switch to java and write it as an external.
thanks for your pointing on the reset message.