Looking at this question from the other side:
how does a developer choose one technology over another?
- integrates better into an already built system
- easier to use
- faster
- has more features or better suits their needs.
- cost
- more platfrom-independentant
So, I will discuss the differences between canvas and webGL APIs regarding these qualities.
Both canvas and webGL are JavaScript APIs. Therefore, they are almost the same in terms of integration (binding). They both have a number of libraries / engines that can speed up your encoding. Different libraries provide you with different ways to organize the code, so it differs in how you structure the code around the drawing API, but it is still pretty much the same (as all the code is linked with it).
If you use a library, the ease of writing code depends on the library itself.
But if you write code from scratch, the canvas API is much easier to learn and understand, it requires minimal mathematical knowledge. Development is fast and direct. WebGL needs a developer with strong mathematical skills who fully understand the creation of the pipeline and know what it does. These people find it harder to find, production is slower (due to the size of the code and the difficulty to integrate into the rest), and therefore it costs more.
WebGL is faster and has more features. Without a doubt. This is the native 3d API and gives you full access to the rendering pipeline, and all code and effects are faster and more customizable. With webGL there really is no limit.
Both canvas and webGL are html5 goodies. Typically supported devices support, while others.
So to summarize:
- merging drawing API code and the rest (integration): similar
- ease of use:
- (with library) canvas = webGL
- (from scratch) webGL <canvas
- speed: webGL> canvas
- features: webGL> canvas
- cost: webGL is much more expensive.
- platform: very similar
Hope this helps.
R. S. Open for discussion.
Abstract Algorithm Feb 08 '14 at 23:41 2014-02-08 23:41
source share