Created
June 18, 2020 12:45
-
-
Save wowotek/b18df7ab66b1cc5b5946c2aebd9dddd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <gl/glut.h> | |
#include <math.h> | |
void | |
OnDisplayRender(void) { | |
glClear(GL_COLOR_BUFFER_BIT); | |
glPointSize(15); | |
glColor3f(0, 1, 1); | |
glFlush(); | |
} | |
void | |
OnDisplayUpdate(int) { | |
glutPostRedisplay(); | |
glutTimerFunc(7, OnDisplayUpdate, 1); | |
} | |
int main(int argc, char** argv) { | |
glutInit(&argc, argv); | |
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); | |
glutInitWindowPosition(480, 150); | |
glutInitWindowSize(800, 800); | |
glutCreateWindow(argv[0]); | |
gluOrtho2D(0, 100, 100, 0); | |
glClearColor(0.0, 0.0, 0.0, 0.0); | |
glutTimerFunc(7, OnDisplayUpdate, 1); | |
glutDisplayFunc(OnDisplayRender); | |
glutMainLoop(); | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment