WebGL related code for the pex library