Archive for May, 2009

Simple OpenGL Program under OS X

May 18, 2009

// Apple gcc program0.c -framework opengl -framework glut

// A simple OpenGL and glut program
#include /* Header File For The GLut Library*/

void display() {
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();

glFlush();
}
int main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitWindowSize(512,512);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow(“The glut hello world program”);
glutDisplayFunc(display);
glClearColor(0.0, 0.0, 0.0, 1.0);
glutMainLoop(); // Infinite event loop
return 0;
}


links for 2009-05-09

May 10, 2009

links for 2009-05-08

May 9, 2009

links for 2009-05-06

May 7, 2009

links for 2009-05-03

May 4, 2009

links for 2009-05-02

May 3, 2009

links for 2009-05-01

May 2, 2009

links for 2009-04-30

May 1, 2009