Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top