DAVE'S LIFE ON HOLD

HTML 5 and a path to smarter clients

So I have been having a lot of fun porting Phos to use WebGL on Chrome, Webbkit nightlies, and FireFox4. The first bit I am going to implement is my interpretations of the Nehe tutorials in Phos. I've done those before for SDL::Perl, and am amazed at how crappy the existing WebGL tutorials are. Even the existing Nehe ones are making it much much more complicated than it should be. The loading strings out of shader scripts, for example, has nothing to do with WebGL programming, and everthing to do with working around DOM implementation cruft.

So far, the implementation largely consists of making a number of changes to Screen to use the right context, and to then draw primitives. I have also added Shader, Program, Model and Transform objects, which encapsulate shader scripts, shader programs, packed geometry data, and a useful set of Matrix transformations. I am probably going to add Camera, Animation, and Pipeline objects to make it easy to synchronize a full scene.

I can already program in the WebGL canvas, and switching all widgets to render model rather than draw their contents is pretty trivial once you have Models and Pipelines ( to programatically change the state of a rendering sequence).

I have been using the HTML5 database interface at work to locally cache content. The same technique can be a great boon for keeping model data local. Next bit is to address networking.