Results 1 to 10 of 34

Thread: Experimenting with WebGL...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Experimenting with WebGL...

    Runs anywhere under Chrome 18+ (will fallback to software if hardware acceleration is not available)
    Runs under FireFox if you have good enough drivers (DirectX or OpenGL)

    On Android, it runs under FireFox Mobile & Opera 12 on my HTC Desire.

    http://delphitools.info/wp-content/u...webgl-poc.html
    http://delphitools.info/wp-content/u...WebGL-poc.html

    Height field & its normals are computed at runtime from JS, haven't benchmarked the thing in detail, but I'm under the impression Chrome & FireFox both JIT the maths code fairly well.

    WebGL isn't ready for high framerate games just yet (other things in the browser can make it stutter for one), and things are missing from the immersion POV (mouse capture, full-screen...) but for games with less ambitions and more static graphics, it is coming close to good enough






  2. #2
    I have done some experiments with webgl some time ago. it was very buggy and worked only in chrome at the time, but it's obviously getting better now that firefox and opera support it.
    http://gen2gdk.com/WebGL/SkinnedMesh/
    http://gen2gdk.com/WebGL/Particles/

  3. #3
    Both your snippets works on Android too under FireFox & Opera, with Opera having the edge.
    The skinned mesh is obviously too much for my paltry phone gpu :/ but particles runs at a good frame rate.
    They run on Web TV too.

    I've been following the W3C & Khronos groups: Mozilla, Google and Apple are all pushing new standards, so it's just a matter of time I guess until the missing bits for game-oriented usage become widely available (full-screen, mouse-capture, audio API etc.).

    Once/if Apple enables WebGL in iOS 6 for widespread usage, that could be a game changer, so to speak.

  4. #4
    it will never be as fast as the native compiled executables though, which is why I decided to use fpc for cross platform game development. but you are right, for the small in-browser games this technology is starting to look very attractive.

  5. #5
    Quote Originally Posted by Dan View Post
    it will never be as fast as the native compiled executables though.
    It depends on the problem and what is used to compile the native executables, f.i. on pure maths like the Mandelbrot set, FireFox and especially Chrome were giving Delphi XE2 a good sweating a few months ago:
    http://delphitools.info/2011/09/02/f...t-performance/

    FreePascal was in the same ballpark as Delphi, but I haven't tried since, it would be interesting to see if it has since caught up with the JS engines.

  6. #6
    WebGL and HTML5 aren't designed to compete against native compiled code. However, Webgl and HTML5 offer something that neither delphi or fpc can and that is that the code is running in a browser. At work we are biting the bullet and moving away from Delphi apps and we will be doing HTML5 apps from now on for our in-house business requirements and our education/games software.
    The views expressed on this programme are bloody good ones. - Fred Dagg

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •