문제

I need to know when exactly glutReshapeFunc calls back the registered function? The book says that the reshape callback is triggered when a window is reshaped. now when does that happen? is reshaping and resizing the same things?

도움이 되었습니까?

해결책

Yes, that's it. Reshaping is the same as resizing. Reshaping happens the first time the window is opened and any time it is resized.

If you are interested in drilling deeper into when exactly GLUT will call back your function, you might browse the source to freeGLUT.

https://github.com/dcnieho/FreeGLUT/tree/git_master/freeglut/freeglut

Edited to add: Reshaping is also when switching between full screen and windowed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top