#include #include #include #include void render() { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POINTS); glVertex2i(150,150); glEnd(); glFlush(); } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(400, 300); glutInitWindowPosition(100, 100); glutCreateWindow("OpenGL Test"); glClearColor(0.0, 0.0, 0.0, 0.0); glViewport(0, 0, 400, 300); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0.0, 400.0, 0.0, 300.0, -1.0, 1.0); glutDisplayFunc(&render); glutMainLoop(); return 0; }