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