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

New Features and a fun webgl demo

February 22nd, 2011

It’s now possible to customize the webgl vertex shader in GLGE the idea being that you can let GLGE do most of the hard work and only add in the extra code needed for custom effects. At the moment you can only update vertex positions but I’m planing for more. To use it you simply need to wirte a function in GLSL:

vec3 GLGE_Position(vec3 pos){
//code to update position here
}

then feed it into a GLGE object:
object.setVertexShaderInjection({GLSL code to add});

Expect more additions soon with regard to customizing the shaders. I’ve also added an optional emit pass to the 2dfilter class so you can now do cool glow effects :-) Here’s a small demo showing off the new features:

Features Demo

In addition I’ve also been playing around with the idea of adding a dynamic hair effect to GLGE, I’m still just playing around at the moment. I’ve put together a fun demo to show where things are at, best viewed with sound ;-)

Play with the hair ball

New Release and Status Update

January 30th, 2011

Since I’ve not had a release in ages as I never think the time is right and things are pretty together right now I’m also announcing the release of GLGE 0.8, skipping a few to reflect the number of optimisations and additions that have been made since the last release:

Get GLGE v0.8

As it’s been awhile since I last posted here is a brief overview of what’s been going on in the world of GLGE in the last couple of months:

Collada Support

Skeletal animation exports from blender 2.5x using the collada are now working quite well, although there are still a few bugs in certain animations, but I’m working on it. Collada support has also come a long way with a million workarounds and fixes for the various exports; please, if you have a file you’re having issues with let me know. I’ve got a demo using some of the assets from yofrankie exported using the blender 2.55 exporter. I meant to post this before christmas but have been lazily putting off, but here is is now:

View Frankie Demo

Video:

Shadows fixed and improved

Shadows have been broken for a while so they are now upto the webgl spec. Plus, there was a bug in the shadow code which was reducing the accuracy of the shadows which has now been fixed. Soft shadows are also working again but are very slow still and I’m sure there is a better way of implementing so it’s still subject to change. Demo showing off the new fixed shadows in GLGE:

View Shadow Demo

Video:

Other features and news

Culling has been added as well as much improved state sorting and other optimisations resulting in much faster rendering. There has also been a major code tidy up and a new build system based on nodejs and using the excellent uglifyjs has been added. The document generation is now included in the build process using node-jsdoc-toolkit, so hopefully documents going out of sync with the source will be a thing of the past.

Communications

I’ve not really been keeping up with the forum and it’s been causing issues for users posing so I’m adding a couple more ways to get support for GLGE:
IRC: #glge on irc.freenode.net
EMAIL: glge@googlegroups.com

Other Projects

A number of projects have popped up using GLGE as there back end:

  1. GammaJS Gamma is a new Javascript library which can be used to create 2.5D platform games for a web browser using the power of HTML, JavaScript, CSS and WebGL. It’s great that the original reason for GLGE has been realised :-)
  2. KataSpace – a simple web-based application built on the Sirikata platform. Utilizing many new HTML5 features, WebGL, and Sirikata’s server, KataSpace provides a shared space where users can chat and interact with each other, right from their browsers.
  3. OurBricks – I’m loving this one, it’s going to be so useful!
  4. SteamCube – My entry to the Moz Game On 2010 comp

If you are using GLGE for a project please drop me a line and I’ll see about posting a link up on this blog.

There is another little webgl project I’ve spent some time working on in the last couple of months but more details of that will follow later ;-)