Name |
Description |
Reference |
Header |
Windows |
Linux |
Mac OS X |
OpenGL |
Basic rendering calls: triangles, vertices, textures, etc. |
The OpenGL FAQ is a good place to start, or the Manual Pages. The OpenGL 1.4 Specification is unreadable legalese. The Red Book is dated but readable. |
<GL/gl.h> (note captialization, Windows people!) |
opengl32.lib (Usually have to add this to your project's linker properties...) |
libGL.so |
-framework OpenGL |
GLUT |
Create windows, set up buffers, handle keyboard and mouse. |
The original GLUT API document is readable. |
<GL/glut.h> |
glut32.lib or freeglut.lib |
libglut.so |
-framework GLUT |
GLEW |
Dynamic interface to latest OpenGL routines. A must for programmable shaders on Windows! |
GLEW makes OpenGL routines work as advertised. The only pure-GLEW routine is glewInit(). |
<GL/glew.h> (Include first; this replaces GL/gl.h!) |
(I prefer it statically linked) |
||
GLUI |
Buttons, scrollbars, dropdown menus, and other widgets. |
I've prepared some doxygen comments. There's also an older GLUI manual. |
<GL/glui.h> |
(I prefer it statically linked) | ||
ogl |
Orion's random crappy OpenGL utilities |
Read the ogl/ header files. |
"ogl/util.h", "ogl/main.h", ... |
(I prefer it statically linked) |
#include <math.h>For a unit sphere centered at the origin, a 3D surface point v's normal vector is... v. No other surfaces work like that, but it's handy for spheres!
#define D2R (M_PI/180.0) /* degrees to radians */
double z=sin(D2R*lat);
double r=cos(D2R*lat); /* 2D radius at z cross-section */
double x=r*cos(D2R*lon), y=r*sin(D2R*lon);