SFML community forums
Help => Window => Topic started by: double_you on June 27, 2011, 04:08:07 am
-
I don't understand how the following example is resizing the opengl viewport:
http://www.sfml-dev.org/tutorials/1.6/window-opengl.php
When creating a window a resize event isn't generated, so glViewport isn't called; however, the example runs correctly.
I'm using SFML 1.6 on Linux.
Any clarification would be greatly appreciated.
Steve.
-
glViewport is called when the window is first created.
-
Cheers for the reply. But where in the documentation does it say glViewport is called when the window is created? I'm getting strange behaviour in my own program that I'm trying to diagnose.
-
Cheers for the reply. But where in the documentation does it say glViewport is called when the window is created? I'm getting strange behaviour in my own program that I'm trying to diagnose.
It doesn't say it in the documentation. Also, what is this strange behavior you're getting?
-
I'm using SFML with opengl and a gui created with CEGUI. When I run my program creating a window doesn't call glViewport (I set a breakpoint to confirm this) so none of my gl calls get displayed. Note that CEGUI does set glViewport internally so it is displayed.
If I use the mouse to resize the window a resize event occurs and glViewport is called, and everything works correctly. Another workaround is to manually call glViewport after creating the window; however, I would like to pinpoint the cause of the problem, rather than hacking in a solution.
Steve.
-
I just ran the example with a breakpoing on glViewport and it seems the example isn't calling it. I thought that was required, but I guess the default viewport works correctly with the example, but not my application.