void reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glutPostRedisplay();
}
int main(){
...
glutReshapeFunc( reshape );
...
}
대충 이렇게 생겨먹었는데
창 크기를 바꿔도 원상태의 도형이 나오게 하려면 어떻게 해줘야 함? ㅠㅠ
void reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glutPostRedisplay();
}
int main(){
...
glutReshapeFunc( reshape );
...
}
대충 이렇게 생겨먹었는데
창 크기를 바꿔도 원상태의 도형이 나오게 하려면 어떻게 해줘야 함? ㅠㅠ
전 OpenGL 하면 흰창밖에 안나오던데
뷰포트를 아직 제대로 이해 못한듯. 그리고 가급적이면 glut 함수 쓰지마 ㅇㅇ