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

MD2 Models in WebGL using GLGE

June 26th, 2011

Just a quick one this time. I’ll hopefully get a chance to post up some more demos during the week, but first off, I finally got round to adding MD2 support to GLGE. It turns out this is an excellent way to get animated models onto the web, being small and simple. Hopefully, I’ll be adding MD3 and MD5 as well before too long. As for using MD2 models it’s very simple:

var myModel=new GLGE.MD2;
myModel.setSrc({path to md2});
myModel.setMaterial({GLGE Material});

and to animate:
myModel.setMD2Animation({animation name});

Live demo

Video – for some reason it’s a bit choppy 🙁 :

WebGL Demo: Sky and New Fog options in GLGE

April 13th, 2011

Having the need to create a more elegant blend to the sky recently I was finding the current fog system lacking in that no matter what set up I was attempting there was always a seam between the land and sky.

As a consequence GLGE now has a sky shader system. Which allows for procedural skies or ordinary sky boxes; in addition, there are two new fog options FOG_SKYLINEAR and FOG_SKYQUADRATIC. These two new fog options allow you to fade the far distance into the sky as apposed to a solid colour. This results in a more seamless transition from land to sky. There is still an issue when using it in combination with post processing effects but for general purpose use it’s very easy to set up and use. This is an early first attempt I have a few ideas for improvments that will hopefully come through at some point.

Live Demo