isfuturebright Posted November 8, 2013 Share Posted November 8, 2013 (edited) I've been using Canvas but on the platform I'm developing at work the framerate is really bad, like 12 to 16fps with some basic 2D animation and a music on the background. I know that the target platform supports WebGL and when checking some basic 3D examples of a sphere rotating the performance looked better. So you think WebGL might make a difference? Edit: The question was actually "Does WebGL renders 2D faster then Canvas?" Edited November 8, 2013 by isfuturebright Link to comment Share on other sites More sharing options...
Mike Posted November 8, 2013 Share Posted November 8, 2013 WebGL is faster then Canvas and that's for sure. isfuturebright 1 Link to comment Share on other sites More sharing options...
isfuturebright Posted November 8, 2013 Author Share Posted November 8, 2013 @Mike the target platform uses some kind of browser based of Safari. I saw that to get WebGL to work on Safari on Macs you have to enable it. When I set the render type to WebGL nothing shows but the log doesn't point any errors either. What you think it's happening? Link to comment Share on other sites More sharing options...
Mike Posted November 8, 2013 Share Posted November 8, 2013 Sorry but this sounds like the platform doesn't support or at least it's not enabled... I can't help you more than a Google search.Let's hope someone else can confirm or give a solution Link to comment Share on other sites More sharing options...
isfuturebright Posted November 8, 2013 Author Share Posted November 8, 2013 I think it's not enabled because as I said I tested some 3D examples with WebGL and they worked pretty good. Anyway I'll look further into it and let you know if anything comes up Thanks for the quick reply. Link to comment Share on other sites More sharing options...
Alvin Posted November 10, 2013 Share Posted November 10, 2013 Try the PixiJs examples (especially the filters one), this is what Phaser uses as its WebGl renderer.And yes, WebGL is way faster than canvas, because it's hardware accelerated. Link to comment Share on other sites More sharing options...
isfuturebright Posted November 11, 2013 Author Share Posted November 11, 2013 @Alvin thanks! I'm able to run this example https://www.khronos.org/registry/webgl/sdk/demos/webkit/Earth.html just fine. So I'm trying to see if it has something different that's needed to render on. The platform I'm targeting is Samsung Smart TV 2013. Link to comment Share on other sites More sharing options...
Alvin Posted November 11, 2013 Share Posted November 11, 2013 You're welcome Try to find what browser the SmartTV has, and check online if there are reported issues with it. Link to comment Share on other sites More sharing options...
isfuturebright Posted November 11, 2013 Author Share Posted November 11, 2013 (edited) From what I could get the browser is identified as Safari uknown version Edit: I was able to run this example http://www.goodboydigital.com/pixijs/bunnymark/ and the performance was much better so I'm assuming it's rendering with WebGL since I couldn't get close to this performance with Phaser with Canvas, but I'm still going to make sure it is rendering with it. Edited November 11, 2013 by isfuturebright Link to comment Share on other sites More sharing options...
Recommended Posts