Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GL/glut.h>
- void
- reshape(int w, int h)
- {
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, w, 0, h, -1, 1);
- }
- void
- display(void)
- {
- glClear(GL_COLOR_BUFFER_BIT);
- glBegin(GL_POINTS);
- for (int i = 0; i<399; ++i)
- {
- glVertex2i(i, (i*i)%399);
- }
- glEnd();
- glFlush();
- }
- int
- main(int argc, char **argv)
- {
- glutInit(&argc, argv);
- glutCreateWindow("some points");
- glutDisplayFunc(display);
- glutReshapeFunc(reshape);
- glutMainLoop();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement