PDA

View Full Version : Viewport does not update



jun wang
02-15-2012, 10:32 AM
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!

menzel
02-15-2012, 10:52 AM
So you say the program worked fine and now it doesn't but you haven't changed the drivers, the app or the hardware?

Makes it harder for a remote diagnosis, right?

So what did you change 'before you didn't change the code'?

jun wang
02-15-2012, 11:13 AM
1. The code does not have any change for sure.
2. I did not change the hardware or app at all recently.
3. The window7 os got automatic update a few days ago. I am not sure if it is because of the automatic update.
4. I ran the program at my home machine (visa OS) and it works great.

Since the program is simple, I would like to email you a copy to test if convenient. Thanks again for your help!

mhagain
02-15-2012, 06:33 PM
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.

jun wang
02-16-2012, 08:54 AM
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.

jun wang
02-22-2012, 01:07 PM
I just uninstalled the video card driver. After that, the program works again. Could you please give me some advice on this? Thanks!