Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <GL/glut.h>
- void renderScene(void){
- glClearColor(1.0, 1.0, 1.0, 0);
- glClear(GL_COLOR_BUFFER_BIT);
- glColor3f(0.0f, 0.0f, 0.0f);
- glBegin(GL_LINE_STRIP);
- glVertex2f(-0.8, -0.7);
- glVertex2f(-0.8, 0.7);
- glVertex2f(-0.7, 0.0);
- glVertex2f(-0.6, 0.7);
- glVertex2f(-0.6, -0.7);
- glEnd();
- glBegin(GL_POINTS);
- glVertex2f(-0.55, -0.7);
- glEnd();
- glBegin(GL_LINE_STRIP);
- glVertex2f(-0.4, 0.7);
- glVertex2f(-0.2, 0.7);;
- glEnd();
- glBegin(GL_LINE_STRIP);
- glVertex2f(-0.3, 0.7);
- glVertex2f(-0.3, -0.7);
- glEnd();
- glBegin(GL_LINE_STRIP);
- glVertex2f(-0.1, -0.7);
- glVertex2f(-0.1, 0.7);
- glVertex2f(0.010, 0.7);
- glVertex2f(0.03, 0.58);
- glVertex2f(0.03, 0.39);
- glVertex2f(0.010, 0.27);
- glVertex2f(-0.1, 0.27);
- glVertex2f(0.050, -0.7);
- glEnd();
- glBegin(GL_LINE_STRIP);
- glVertex2f(0.15, -0.7);
- glVertex2f(0.15, 0.7);
- glEnd();
- glBegin(GL_LINE_STRIP);
- glVertex2f(0.35, -0.7);
- glVertex2f(0.515, 0.7);
- glVertex2f(0.68, -0.7);
- glEnd();
- glBegin(GL_LINE_STRIP);
- glVertex2f(0.419, -0.25);
- glVertex2f(0.60, -0.25);
- glEnd();
- glBegin(GL_POINTS);
- glVertex2f(0.73, -0.7);
- glEnd();
- glFlush();
- }
- int main(int argc, char **argv){
- glutInit(&argc, argv);
- glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
- glutInitWindowPosition(180,200);
- glutInitWindowSize(1000, 400);
- glutCreateWindow("NAMA");
- glutDisplayFunc(renderScene);
- glutMainLoop();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement