Pergunta

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?

Foi útil?

Solução

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 em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top