sample webgl code, mostly from webgl book