Re: WebGL specification 1.0 is final — and also, WebCL?
Posted by
gouessej on
Mar 05, 2011; 10:52am
URL: https://forum.jogamp.org/WebGL-specification-1-0-is-final-and-also-WebCL-tp2631673p2637622.html
Hi!
BrickFarmer wrote
I think the performance is becoming less of an issue. Javascript is probably running as fast now as Java was when JOGL first got going
I completely disagree with you. On one hand, I studied the implementation of computing language during my Master's degree and JavaScript typing has some consequences on the way it is executed, it will never be as fast as Java even though JavaScript performances will go on being improved because much more things have to be controlled at runtime with loosely typed languages. Kenneth Bradley Russell has been working on an equivalent of NIO buffer for JavaScript and WebGL, it is a good stuff :)
On the other hand, the performance is still an issue especially on mobile phones. We should not do everything on the GPU, it is an inefficient approach, splitting the jobs between the CPU and the GPU is more efficient. Therefore, the speed of the CPU has an important impact on the performance. Some tasks are particularly resource hungry, time consuming, for example the physics, especially the collision system and the space partitioning. If you use a language that is between 2 and 20 times slower than Java on the CPU on mobile phones, low end smartphones with Android and even high end smartphones with Android will suffer. First Person Shooters are not numerous on Android, such a penalty in the performance would drive them unplayable.
As a consequence, keep in mind that WebGL has its own advantages but it is not a magic tool. It will have some (a lot of?) success even though it is less mature than Java and it has less API and tools but it is not the most suitable solution especially in performance critical applications, especially in scientific visualization and non trivial 3D games with large environments.