Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm thinking about using CAAT as a part of a HTML5 game engine. One of it's features is the ability to render to Canvas and WebGL without changing anything in the client code. That is a good thing, but I haven't found precisely: what are the differences between those two technologies?

I would specially like to know the differences of Canvas and WebGL in the following regards:

  • Framerate
  • Desktop browser support
  • Mobile browser support
  • Futureproofability (TM)
share|improve this question
1  
I would imagine this varies from project to project and platform to platform. I would guess it's not answerable with a definitive answer. – Byte56 Oct 1 '12 at 2:29
2  
Technically, you need a canvas element to render with WebGL, so it's better to refer to the Canvas 2D Context. – Laurent Couvidou Oct 1 '12 at 8:56

1 Answer

up vote 7 down vote accepted

1) Framerate varies by browser. Some still do not support accelerated canvas rendering, others don't support WebGL at all. Best bet is to profile actual code on actual target hardware/browsers.

2) WebGL is not supported by IE, probably never will be. WebGL support is often blacklisted on machines with older hardware or drivers where canvas should still work. WebGL is not a technology you should bet a commercial venture on at this time. (Note that I have shipped a commercial WebGL game; WebGL support issues were a huge problem.)

3) Almost no mobile browsers in the wild support WebGL. They almost all support canvas.

4) Cnavas is around to stay. So is WebGL. Neither is more future proof than the other.

share|improve this answer
2  
I'm curious what game did you ship? I'm always interested in WebGL related topics and I've seen very view commercial WebGL games. – Anton Oct 1 '12 at 4:03
More info on WebGL support: caniuse.com/webgl. – Yannbane Oct 1 '12 at 12:52
Thanks for the info, seems Canvas is the safer bet. – gadr90 Oct 3 '12 at 1:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.