This is a WebGL 1.0 translation of C++/OpenGL code examples from Jason L. McKesson's book Learning Modern 3D Graphics Programming.
It's a work in progress. Below is the list of examples translated so far.
Use browser's View Source
to see example's GLSL and GL code or browse
the repo on GitHub.
I. The Basics
- Hello, Triangle!
- Playing with Colors
- Fragment Position Display
- Vertex Attributes
II. Positioning
- OpenGL's Moving Triangle
- Objects at Rest
- Objects in Depth
- Multiple Objects in OpenGL
- Optimization: Base Vertex
- Overlap and Depth Buffering
- Boundaries and Clipping
- Depth Clamping
- Objects in Motion