Some interactive demos
Back to my research page.
Back to my personal page.
research papers videos:
OpenGL1.x in webGL: ( folder )
OpenGL 1.x ( + glu / glut ) was so convenient to learn graphics and to program quicky graphics applications !
With OpenGL 2 and more, and thus with webGL, ok you can now program fancy GPU shaders, but any simple program now need pages of initialisation, and all the convenient fonctionalities are now gone, far beside the glBegin/glVertex/glEnd immediate mode: lights, materials, matrices, flat shading mode, wireframe mode, keyboard and mouse events, menus, fonts, picking, pointSize, texture 1D, texGen, usual solid objects, display-lists...
Since no wrapper seemed to be available online (!), I wrote a lib for easy port of OpenGL1 programs to webGL, and have all these features back (even printf :-) ). Here it is, for your convenience.
Demos : (folder) 2D/3D fractals, minimal surface, mountains (simple), mountains (with particles and automatas), particles, colors in volume.
Lib: see folder/lib/, or tgz package. (webserver is to test your pages out of web using nodejs).
Guide of how to port your code to webGL using wOpenGL1.js .
BUG: on old chrome, firefox, opera, or on IE, Safari (see ECMA-262 compatibility ) you'll only get a blank page, since these don't implement back-quote strings `...` (so useful for multiline data such as shaders or help messages !). -> If you want to stick to these browsers+versions, you'll simply have to replace these (few) by a bunch of "...\n"+ at each line, once in cafe.html (help), twice in wOpenGL1.js (shaders), once in contextMenuCSS.js (or simply comment out its require in wOpenGL1.js if you don't use glut.menus)
Here is a fix for you: demo fractal-noBQ, lib wOpenGL1-noBQ.js.