I am trying to write WebGL code automatically from rgl scenes in R. (If you don't know rgl and R, it's not really important.)

Part of the problem is that once things are working properly, I'm going to handle multiple objects in each scene (typically 5 or 10), each with its own vertex shader. Vertices in the objects may have separate colours. I will need to display points and lines as well as triangles.

Can anyone suggest examples like this? Currently I started working from a couple of simple examples at www.ibiblio.org/e-notes/webgl/webgl.htm (the ship and NaCLb5 examples), but there are no examples of drawing points there.

Also, are there any suggestions for debugging? My first attempt loads without errors, but nothing is being displayed.

Duncan Murdoch