Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top