// http://www.codebind.com/linux-tutorials/install-opengl-ubuntu-linux/ #ifdef __APPLE__ #include #include #include #else #include #include #endif void displayMe(void) { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POLYGON); glVertex3f(0.5, 0.0, 0.5); glVertex3f(0.5, 0.0, 0.0); glVertex3f(0.0, 0.5, 0.0); glVertex3f(0.0, 0.0, 0.5); glEnd(); glFlush(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE); glutInitWindowSize(1920, 1080); glutInitWindowPosition(0, 0); glutCreateWindow("Hello world!"); glutFullScreen(); glutDisplayFunc(displayMe); glutMainLoop(); return 0; }