An open source equivalent to OpenGL.
Fedora Core 4 or RedHat required the X development package.
make linux-x86 As root make install
Previously it was a little harder or I was just doing weird stuff.
Downloaded MesaDemos-5.0.tar.gz and MesaLib-5.0.tar.gz .
As root, copy MesaDemos-<>.tar to /usr/local and expand.
Then copy MesaLib-<>.tar to /usr/local and expand.
Then in Mesa<> ./configure then ./make
After the build find the library files.
find . -name \*.so
./src/OSmesa/.libs/libOSMesa.so
./src/.libs/libGL.so
./si-glu/.libs/libGLU.so
./src-glut/.libs/libglut.so
Copied to /usr/lib/ except for libglut.so as
the glut lib depended on other crap. So
inside ./src-glut/.libs/
cp -d libg* /usr/lib/
For some reason you need to download the MesaDemos to compile glut! Sanity???
Using the libraries code is fairly straight forward.
When compiling OpenGL and Glut -lGLU -lGL -lglut -L/usr/lib -I/usr/include/GL .
Color Notes Exam Notes Writing Modes
glBitmap
(
int width, int height,
float originx, float originy,
float rasterincx, float rasterincy,
GLubyte* bitmap
)
void glOrtho(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1,
GLdouble z0, GLdouble z1 );
void gluOrtho2D(GLdouble x0, GLdouble x1, GLdouble z0, GLdouble z1);
void gluLookAt( from, to, up );
gluCylinder(GLUquadricObj* , GLdouble rBase, GLdouble rTop, GLdouble h,
GLint slices, GLint stacks);
gluDisk(GLUqudricObj* , GLdouble R0, GLdouble R1, GLint slices, GLint rings);
gluSphere(GLUquadricObj* , GLdouble R, GLint slices, GLint stacks);
void glutSolidCube(GLdouble size);
void glutSolidSphere(GLdouble r, GLint slices, GLint stacks);
void glutSolidTorus(GLdouble r0, GLdouble r1, GLint sides, GLint rings);
void glutSolidIcosahedron();
void glutSolidDodecahedron(GLdouble r);
void glutSolidCone(GLdouble r, GLdouble h, GLint slices, GLint stacks);
glLightf(GL_LIGHT1,GL_SPOT_CUTOFF, 45.0);
float sd[3]={-1.0,-1.0,0.0}; glLightf(GL_LIGHT1,GL_SPOT_DIRECTION);
GL_ < SPOT_EXPONENT, SPOT_CUTOFF, CONSTANT_ATTENUATION, LINEAR_ATTENUATION >
float amb[4]={.2,.2,.2,1.0}; glLightModelfv(GL_LIGHT_MODEL_AMBIENT,amb);
GL_LIGHT_MODEL< AMBIENT, LOCAL_VIEWER, TWO_SIDED, COLOR_CONTROL >