WebGL made easier with PhiloGL
WebGL made easier with PhiloGL
Wednesday, 23 February 2011

WebGL is great but it is a little primitive. PhiloGL hopes to put an end to the messing around with shader by providing a higher level API for 3D graphics on WebGL.

WebGL is a 3D drawing context for the HTML5 canvas object, but what is not often mentioned is that it is fairly primitive. It is a low level 3D API based on OpenGL/ES and as such a lot of programmers have a good idea how to use it but.. what if you want to create 3D apps without having to grub about in the GPU basement?

philo2

One possible solution is to use the PhiloGL open source framework which has just been released by Sencha Labs. Written in JavaScript (of course) it provides the abstractions that most programmer are familiar with in higher level 3D graphics APIs. For example, you can use a camera to set the view and a scene object includes lights both ambient and directional. What this means is that you can mostly ignore the problem of setting up shaders, although there are methods that let you specify custom shaders if you need them.

At a slightly less exciting level, although essential, it includes methods for matrix and vector operations - something WebGL lacks. It also has support for easy 3D models complete with normals and textures and there are a small number of standard models such as a cube and a sphere.  Utilities to make using worker threads easier are also provided along with methods to load resources.

 

philo1

There is documentation of the full API on the website and lots of examples to get you started - and some are quite impressive.

Overall the framework strikes a good balance between abstraction and staying reasonably close to the OpenGL way of doing things. Given that it is open source and issued under the MIT licence it is worth a try.

Alternatives to the PhiloGL framework do exist- notably the Canvas 3G JavaScript library which offers a similar range of facilities but seems to have fairly low developer activity.  We could really do with one single WebGL library to put our collective efforts behind - perhaps we need another standard.

 

philo2

More information

PhiloGL

C3DL

A Programmer's Guide to Canvas

Getting started with WebGL

 

Banner


MyRocks For Percona Server
08/12/2017

There's an experimental release of MyRocks in Percona Server for MySQL 5.7, with packages. MyRocks is open source software that was developed at Facebook to provide a way to use MySQL features with Fa [ ... ]



Countdown to Xmas with Santa Tracker
03/12/2017

Santa Trackers, from Norad and Google have become part of the Christmas tradition and both of them have now started their countdown to Christmas Eve when Santa takes off from the North Pole to deliver [ ... ]


More News

<ASIN:0321712617>

<ASIN:0240813286>

<ASIN:1430228741>

Last Updated ( Wednesday, 23 February 2011 )
 
 

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.