컴퓨터그래픽스과제 4 - 주전자
- 최초 등록일
- 2014.08.22
- 최종 저작일
- 2014.05
- 11페이지/ 한컴오피스
- 가격 2,000원
목차
없음
본문내용
#include <GL/glut.h>
#include <stdlib.h>
int count=0;
void init()
{
glClearColor(1.0,1.0,1.0,1.0);
//glClearColor(0.0,0.0,0.0,0.0);
}
void myReshape(int w, int h)
{
glViewport(0,0,w,h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h)
glOrtho(-3.0, 3.0, -3.0 * (GLfloat) h / (GLfloat) w,
3.0 * (GLfloat) h / (GLfloat) w, -10.0, 10.0);
else
glOrtho(-3.0 * (GLfloat) w / (GLfloat) h,
3.0 * (GLfloat) w / (GLfloat) h, -3.0, 3.0, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
참고 자료
없음