티스토리 뷰

// 컴퓨터그래픽스 교재 P174 예제

#include<glut.h>

#include<gl.h>
#include<glu.h>

void MyDisplay(){
 glClear(GL_COLOR_BUFFER_BIT);
 glColor3f(1.0,0.0,0.0);
 glBegin(GL_POLYGON);
  glVertex3f(-0.5,-0.5,0.0);
  glVertex3f(0.5,-0.5,0.0);
  glVertex3f(0.5,0.5,0.0);
  glVertex3f(-0.5,0.5,0.0);
  glEnd();
  glFlush();
}
int main()
{
 glutCreateWindow("OpenGL Drawing Example");
 glClearColor(255,255,0.0,0.0);
 glutDisplayFunc(MyDisplay);
 glutMainLoop();
 return 0;
}

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함