WebGL Fundamentals

Gregg Tavares, February 9th, 2012. HTML 5 Rocks.
WebGL makes it possible to display amazing realtime 3D graphics in your browser but what many people don’t know is that WebGL is actually a 2D API, not a 3D API. Let me explain. WebGL only cares about 2 things. Clipspace coordinates in 2D and colors. Your job as a programmer using WebGL is to provide WebGL with those 2 things. You provide 2 “shaders” to do this. A Vertex shader which provides the clipspace coordinates and a fragment shader that provides the color.

[WebGL Fundamentals]

Advertisements