'GLUT_WINDOW'에 해당되는 글 1건

  1. 2011.10.09 glut 에서 윈도우 크기 얻기
Programming/openGL2011. 10. 9. 02:01
viewport 와 ortho를 이용해서 크기 조절을 하려니
glut에서 현재 윈도우 사이즈를 구할 필요가 있는데,

물론 reshape 쪽에서 얻어지는 값을 이용해서 width 와 height를 저장하는 법도 있겠지만
머.. 방법론적인 문제니까 ^^;

To obtaining the screen and window width and height using GLUT:

int screenWidth, screenHeight, windowWidth, windowHeight;

screenWidth = glutGet(GLUT_SCREEN_WIDTH);
screenHeight = glutGet(GLUT_SCREEN_HEIGHT);
windowWidth = glutGet(GLUT_WINDOW_WIDTH);
windowHeight = glutGet(GLUT_WINDOW_HEIGHT); 

[링크 : http://www.opengl.org/resources/faq/technical/window.htm
 

'Programming > openGL' 카테고리의 다른 글

openglut / freeglut 무슨 사이야?  (0) 2011.10.09
freeglut - glutMouseFunc()  (0) 2011.10.09
openGL의 미스테리...  (0) 2011.10.08
openglut - glutentergamemode()  (0) 2011.10.08
glOrtho()  (0) 2011.10.07
Posted by 구차니