Hi all!
I write simple 3d scene: grid, sphere and also im going to write class witch simulate gravitation. In a word I just want to "drop sphere to the floor".
Recently I thought about one question that is infinite execution of function draw(). As I know call speed can adjust with function frameRate() and by defalt is 60. So we exicute 60 time per second all in function draw()! (I'm alredy afraid) Then I see that every 1/60 second is rendering of grid it is cycle 20*20 and running so massive functions as beginShape(), vertex() and etc.. And it is only in the simplest case! I think it is very inefficiently. I used to observe that 2 CPU are busy by 90%.
In sum, how I can optimize all these things? Or I need render grid every frame despite that its position doesn't change and there is nothing to calculate? Must I worry about it or it is normal?
I may give src if necessary
Thanks in advance
1