What is GLGE?

GLGE is a javascript library intended to ease the use of WebGL; which is basically a native browser javascript API giving direct access to openGL ES2, allowing for the use of hardware accelerated 2D/3D applications without having to download any plugins.

The aim of GLGE is to mask the involved nature of WebGL from the web developer, who can then spend his/her time creating richer content for the web.

Get GLGE v0.9

Fork me on GitHub

WebGL – GLGE Updates and Demos .. Video & Canvas Textures Plus Filters

July 18th, 2010

Not one or two but three demos this time. I’ve spent a little bit of time pulling togther code thats been hanging around for a while resulting in a number of new features. In addition, thanks to an excellent suggestion from Dennis Ippel I’ve added the ability to chain commands in the API eg:

myGroup.setLocX(10).setLocY(10).addObject(object1).addObject(object2);

Taking it one step further I’ve also added a quick notatation so you need even less code, so the example above can be written as:

myGroup._({LocX:10,LocY:10},object1,object2);

As well as that I’ve also got GLGE working in the latest nightlies of chromium and firefox, I’ve not been able to check webkit so shout if there is an issue. Be warned this may have broken things in older browsers :-(

2D Filters

GLGE now has the ability to apply 2D post processing filters to 3D scene, at the moment you need to write them in GLSL but I will try and build some common ones in(blur,dof,SSAO,bloom etc) before the next release. I’ve put together a demo terrain with some God rays and DOF:

Play Live Demo

Video Textures

GLGE can now apply a video as a texture, although the webgl video texture option seems to still be missing in webkit I’ve worked around it for now by taking the video via the canvas so it should work cross browser. Although the demo is only using ogg theora so I’m not sure about safari?.

Play Live Demo

Canvas Textures

As well as video GLGE can now display 2D canvas as a texture, in addition I’ve added texture coordinates to the ray query so you can interact with the canvas as you would normally. The demo below demostrates this by allowing you to draw onto the canvas that is being mapped to the cube.

Play Live Demo

WebGL – A Platform Game in GLGE v0.5

July 4th, 2010

I’ve finally got round to pulling stuff together for a well overdue release. Since this one is so late I’ve skipped a couple of versions as an indication of how much has been done since v0.2.

Some of the new features:

  • Environment Mapping
  • Bounding Volumes
  • Render to Texture, with built in oblique near-plane clipping, for reflections and refractions
  • Collada Animation support
  • Completely re-done skeletal animation; there is no longer a limit on the number of bones.
  • A new particle system
  • There is also experimental soft shadow support.

You may have noticed that the original GLGE animated man disapeared a little while ago. Unfortunately he doesn’t work in the new system and I seem to have lost the original blend file, so I don’t think I’ll be able to bring him back :-( ; I have however done a completely new test man with animations. As always I’ve had to rush the modeling and animation to get it done – one of these days I’ll spend some proper time on the arty side of things ;-)

Anyway I’ve used the new man in a simple platform game. It’s still very buggy as I’ve not sorted out proper physics yet but it shows off v0.5 quite well:

Play Live Demo

Video:

If you’re intrested I’ve made the blend files for this one available with the export script, which still needs a little manual intevention, but it’s getting there slowly. Download:

file1

file2