I finished Learningwebgl.com and Mozilla tutorials, everything look good at first, but...
Unfortunately, My first engine slow-down after making lots of functions and also separating scripts into pieces (like core.js, math.js, mesh.js and so on), so I get into this performance issues.
Now it takes few seconds to load page on LocalHost (which is quite fast), and also few more seconds to load textures and meshes, and Chrome freeze down after refreshing page for a few times, CPU/GPU usage is abnormal, and even my 'Wam开发者_如何学JAVApServer' crash down!
I'm not Javascript master, but this thing (webgl) looks very sensitive and easily broken down by any mistake, I make Online Painting application with Canvas2D and never had similar issues.
I notice performance is much higher when I put all the scripts into single HTML or JS file than lots of small scripts, maybe that's the issue?
Note: I'm not using jQuery or any additional libraries. (only glMatrix and RequestAnimationFrame scripts)
Question: Please give me some tips before re-writing my engine from ground up, I don't want to do same mistakes!!
Sorry for language
I've found one good speech about WebGL optimizations. Hope it will be usefull: http://www.youtube.com/watch?v=rfQ8rKGTVlg
There is quite impressive section on how to improve WebGL performance.
精彩评论