View Full Version : glViewport every frame?

01-10-2006, 09:52 AM
Is it OK to call glViewport once (or even multiple times) per frame?

I just noticed that I'm being lazy and just calling it at start of every frame (in case the user changed his FOV settings or something), but now I'm wondering whether there's some overhead behind it (even if it's only for some drivers, I'd rather not have this happening).

01-10-2006, 12:16 PM
It's no biggie, there's a miniscule overhead you'll probably not notice, however changing FOV settings will not require a viewport call, resizing the window in some way would. So you only need to do this on receiving certain key events like create and resize events.

FOV changes are projection matrix only (if your app is structured correctly).