I have an openGL based win32 program (using glut32.dll). A few days ago, it ran well. But I got a problem yesterday. The problem is: After launching the *.exe file, the viewport does not update. When I resized the viewport, the viewport does not update either, see the attachment.
There is not any change in the code actually. I doubt it may be caused by the graphic card (NVIDIA GeoForce GTX 260 with latest driver) or…? Please help, thank you very much!
A Windows update shouldn’t affect this - glViewport is called by your program, executed by the driver and actually handled by your graphics hardware so they’re the places to go looking. One quick test you can do is to call glViewport every frame instead of on creation or size change - no, there won’t be any measurable performance loss (Quake did that - twice per frame - on ancient 3DFX hardware back in 1996 and it ran well) so it’s safe to do and will confirm for you if things work or not. It’s also worth setting some breakpoints and running your program under a debugger, checking the values that actually get sent to your glViewport call.
Thanks very much for your help. Could you give me some specific implementation on that? If necessary, I would give you the source code for testing. The source code is pretty simple and small actually. Thanks!
In addition, the weird thing is that the program has been working well for one year. This issue comes out only recently and I did not make any change on the openGL related code in the program.