Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualncsu121978

Posted 05 April 2013 - 07:35 AM

I am beginning to wonder if there is an issue with the OpenGL drivers from Nvidia on Windows 7. I do my normal programming on my laptop with a GTX 560M graphics card. I do have an external monitor plugged into my laptop and utilize both screens as an extended display setup. But the problem persists even when not using the external monitor.

I coded up a super simple program in C# using SFML2.NET with Visual Studio 2012. All it does is create a RenderWindow and move a RectangleShape across the screen and when it gets to the far right then moves it back to the left to repeat. If I run this in fullscreen mode then I have no issues. When I run this in windowed mode I get a strange graphical glitches. About 2-3 times per second (about every 20 or so frames since I run at 60FPS with vsync) then my image for a brief moment jumps backwards as if it were drawn where it was 10-15 frames ago, and then immediately jumps back to where it is supposed to be. Its as if for one frame, it is still drawing a frame from 15 frames ago instead of the current one.

I recreated the same exact program but in C++ with SFML2 using Visual Studio 2012 and has the same results. It is OK in fullscreen but has the issue in windowed mode.

I then recreated the same program in C++ except utilizing DirectX and there is no problems in Windowed mode or fullscreen.

I then recreated the same program in C++ with SFML2 on Ubuntu using the gcc compiler and Code::Blocks. It has no issue in windowed or fullscreen.

So it seems to me there is some kind of OpenGL driver issue on Nvidia in Windows 7. It could just be a bug in the Windows version of SFML2 before it even makes the call to OpenGL. I am going to code just straight to OpenGL instead of going through SFML to see if the problem still repeats itself.

I know this isnt any kind of physics or math issue on my part for the positioning as all I do each frame is do a +2 to the rectangle shapes x position every frame for this test.

Also put a breakpoint in to a conditional statement that if the x position is ever smaller than it was the last frame then it would hit the breakpoint and I could see it. I did make the exception that the breakpoint wouldnt trigger if it is when i manually set the x position to 0 while doing the screen wrap. This would let me detect if something was screwy with the simple math but it never hits the breakpoint saying that the x position is smaller than it was the last frame.

Anyone else have issues like this?

[Edit]Appologies for the formatting of this text. My work computer doesnt display this website correctly and isnt letting me put breaks in the text

#1ncsu121978

Posted 05 April 2013 - 07:33 AM

I am beginning to wonder if there is an issue with the OpenGL drivers from Nvidia on Windows 7. I do my normal programming on my laptop with a GTX 560M graphics card. I do have an external monitor plugged into my laptop and utilize both screens as an extended display setup. But the problem persists even when not using the external monitor. I coded up a super simple program in C# using SFML2.NET with Visual Studio 2012. All it does is create a RenderWindow and move a RectangleShape across the screen and when it gets to the far right then moves it back to the left to repeat. If I run this in fullscreen mode then I have no issues. When I run this in windowed mode I get a strange graphical glitches. About 2-3 times per second (about every 20 or so frames since I run at 60FPS with vsync) then my image for a brief moment jumps backwards as if it were drawn where it was 10-15 frames ago, and then immediately jumps back to where it is supposed to be. Its as if for one frame, it is still drawing a frame from 15 frames ago instead of the current one. I recreated the same exact program but in C++ with SFML2 using Visual Studio 2012 and has the same results. It is OK in fullscreen but has the issue in windowed mode. I then recreated the same program in C++ except utilizing DirectX and there is no problems in Windowed mode or fullscreen. I then recreated the same program in C++ with SFML2 on Ubuntu using the gcc compiler and Code::Blocks. It has no issue in windowed or fullscreen. So it seems to me there is some kind of OpenGL driver issue on Nvidia in Windows 7. It could just be a bug in the Windows version of SFML2 before it even makes the call to OpenGL. I am going to code just straight to OpenGL instead of going through SFML to see if the problem still repeats itself. I know this isnt any kind of physics or math issue on my part for the positioning as all I do each frame is do a +2 to the rectangle shapes x position every frame for this test. Also put a breakpoint in to a conditional statement that if the x position is ever smaller than it was the last frame then it would hit the breakpoint and I could see it. I did make the exception that the breakpoint wouldnt trigger if it is when i manually set the x position to 0 while doing the screen wrap. This would let me detect if something was screwy with the simple math but it never hits the breakpoint saying that the x position is smaller than it was the last frame. Anyone else have issues like this?

PARTNERS