3 ms·
I started a prototype of a guide like this. I think it's probably the best way to teach OpenGL. Besides not messing with compilers and linkers (a huge advanta
by nulltype 11y ago
I started a prototype of a guide like this. I think it's probably the best way to teach OpenGL. Besides not messing with compilers and linkers (a huge advantage) you can have interactive demos right there in the guide, which is pretty cool. As well as explanatory demos like http://acko.net/files/fullfrontal/fullfrontal/webglmath/online.html http://acko.net/files/fullfrontal/fullfrontal/webglmath/onli... In addition, I think WebGL will raise exceptions on errors, unlike C OpenGL, which is really really nice when you're trying to learn it.
One thing that I think is missing is having a code description of how things work. If you can present shaders as for loops over the input vertices or pixels, it might be more clear than just a bunch of diagrams. I had to write my own rasterizer in order to get a decent idea of how it worked.
Another that might be missing is the state possessed by OpenGL. The linked guide calls it a state machine but there's no state machine diagram or anything. Just having a list of the most common OpenGL state and a way to print it all out might be nice. I've had a lot of bugs (like not setting glViewport or having the wrong GL_RENDERBUFFER bound) that would probably be easier if I could see the current OpenGL state or even know that GL_RENDERBUFFER wasn't changed by GL_FRAMEBUFFER.
- sgrove 11y agoI've actually been writing a guide to WebGL via Gamma (a bit like React.js for WebGL, written in ClojureScript), and was able to take it a bit further. * Live editing tutorials with the code directly embedded [0] * Hot-reloadable WebGL code [1] * Hot-reloadable WebGL code in multiple browsers [2] * Inspector tools that are able to detect common errors and explain them [3] The live-editing aspects really helps recover from black-screen-syndrome much faster, and keeps the experience from being more overwhelming than it has to be. Unfortunately, almost everything that's written for WebGL on the web right now is actually written for Three.js. Three.js is great, but it does make it a bit frustrating trying to understand the basic WebGL state/code underneath when first learning. I'm up to 32 lessons so far (e.g. textures, specular maps, camera, WebSockets, WebRTC/udp), and definitely hoping to be able to explore more and more holistic topics. If anyone has suggestions for topics they'd like to see covered, happy to take a look! [0] https://www.youtube.com/watch?v=Q5vh1Xj-xM4 https://www.youtube.com/watch?v=Q5vh1Xj-xM4 [1] https://www.youtube.com/watch?v=rboZswsKwaw https://www.youtube.com/watch?v=rboZswsKwaw [2] https://www.youtube.com/watch?v=mKsL9ZRfXWw https://www.youtube.com/watch?v=mKsL9ZRfXWw [3] https://www.youtube.com/watch?v=Gbpe3hEYKgg https://www.youtube.com/watch?v=Gbpe3hEYKgg
- nulltype 11y agoThat's pretty amazing! Is the guide available as a webpage?
- sgrove 11y agoThat's the plan. Gamma's still in super-high flux as I use it for a production-grade app (along with Om/Datomic, some fun tech). Once things settle down, I expect ClojureScript should be pretty close to self-hosted, so everyone should be able to visit the page, see the code, edit it live, and see it output/working immediately, all in the browser.