Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for some tips to optimize my WebGL 3D Engine

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 'WampServer' 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

like image 930
xxx Avatar asked Oct 20 '25 09:10

xxx


1 Answers

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.

like image 65
przemo_li Avatar answered Oct 26 '25 02:10

przemo_li



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!