EEK! 100fps->40fps!

ok ouch! I installed Win2K about 2 days ago and all my OpenGL apps dropped from 100fps down to ~55fps! is there something special I have to do in order to program OGL apps for Win2k? (Does is have anything to do with the cursor shadow or something?)

If any Win2K developers here can give me an answer,It would be most appreciated.

possibly you have vsinc enabled… and it depends on wich drivers you use, too

Hmm…I’m using the latest detonator drivers for Win2K form nVidia.

How do I disable vsync?

go to the displaysettings of windows, there to where you can choose the resolution/colordepth, to advanced, and there to geforce2mx (or whatever YOU have ) and there to additional properties and there to openglsettings and there vertical sync… disable…

I’ve heard that the cursor drop shadow can interfere with 3D apps as well. I’d disable it to make sure.

  • Tom

Wow this is really wierd…

Without VSync,my blank OGL app runs at ~500fps (is that even possible on a PII 450 with a GeForce2 GTS Win2K 256MB RAM?) And with VSync turned on,I get about 56fps. Needless to say,this is a huge gap.I can’t help but feel something else is going on.

Before I installed Win2K on my machine,I had WinME with VSync on.And my test apps ran at about 100fps.The other test app ran at 91fps. Now compare the difference.

Win2K - VSync ON
App1: 56fps
App2: 56fps (both apps ran at the same speed)

Win2K - VSync OFF
App1: ~530fps
App2: ~250fps

WinME - VSync ON
App1: ~100fps
App2: ~92fps

Incase you’re wondering,App1 does nothing but draws a grid of lines and I move the camera around with the keyboard and mouse. App2 is my test app that streams an AVI file onto a texture (using glTexSubImage2D()) and draws a quad with that texture map.

So,does anybody know what’s going on?

Is it possible that in WinME you were using a different monitor refresh rate? The way VSync works is it waits until your monitor does a verticle refresh (when the laser is travalling from bottom right to top left of screen). I fyou refresh rate is at 60hz you’ll get approx. 60 fps. If your refresh is at 100hz you’ll get approx 100 fps. This should be settable somewhere in your display properties as well. Also the DEVMOD structure you pass to ChangeDisplaySettings takes the parameter “dmDisplayFrequency” you can use this to set which frequency you want (make sure you dont go over your monitor’s limit though). I’ve recently added this into my own app. I have a utility that enumerates all the display modes (including refresh frequency) and allows me to pick which one I want my app to use.

In WinME, I had the same refresh rate (75hz) as well as VSync on and everything was working fine (see stats above)

Well,let’s look at it in another way. Programatically speaking,what kind of frame rate am I supposed to expect with my machine if I just wrote an OpenGL app (no GLUT) that does nothing (just draws a blank screen) in the main loop?

My machine specs are as follows:
Win2000 Pro
256MB RAM
GeForce2 GTS 32MB DRR RAM with latest detonator drivers for Win2K
19" A90 monitor with a refresh of 75Hz (There is no way in hell I’m going below this because my eyes start to hurt.I can sort of see my monitor refreshing)
VSync ON

Any ideas?

hmmm with vsync on, how about 75fps? ;^)
i believe your programs timer is incorrect
disable the vsync option (in display properties) + try the win swap interval extension program on my site (url in profile). with nvidia cards with win2000 it syncs to refresh in a window. does this hold true for win9x as well, or is it just fullscreen. anyone?

windows 2000 implies a loss of performance in 3d graphics, by comparison with 98/ME.

It has been verified in all 3d benches, in Direct3d AND in OpenGL.
Sorry about that, but if you want to have the best perf (but not stability), just use winME.

Originally posted by zed:
i believe your programs timer is incorrect

Yes, I would agree with you, it must be incorrect, based on the following 2 quotes:

Originally posted by TheGecko:
WinME - VSync ON
App1: ~100fps
App2: ~92fps

Originally posted by TheGecko:
In WinME, I had the same refresh rate (75hz) as well as VSync on

There is no way you could have a refresh of 75hz with vsynch on and get a frame rate of 100fps.

[This message has been edited by LordKronos (edited 03-26-2001).]

I believe the performance issue is due to AGP being buggered under 2K…

Someone told me that Service Pack 1 fixes this.

Although according to Nvidia you can get near 30 million tri’s a sec on Geforce 1 in 98… I can only manage about 5 million under 2k SP1…

Nutty

30 million tris/sec? … it is 15 IIRC … and I’ve achieved ~7 Mtris/sec when NOT using display lists or VAR. (Reasonably small vertex arrays.)

It could be my CPU that stops at that rate as well, since the app I tested with tesselates bspline-surfaces in realtime.

On Win2k, that is.

I seriously doubt that Win2k vs. WinME can cut performance in half. A wee bit maybe, but not that much.

Win98 is equal to Win2k on my machine at least.

I had a similar problem - when i was running 98 i could get my GF1 to do 14 million tris/sec - and the vertex throughput was like 400mb/sec (this was Benmark 5 - DX)

under win2k in can get a max of 7 million tris with the same settings - and vertex bandwidth is like 200 mb/sec.

pretty dodgy if you ask me - but then the instability of 9x does my head in more than the performace loss in win2k

Originally posted by prekipik:
[b]windows 2000 implies a loss of performance in 3d graphics, by comparison with 98/ME.

It has been verified in all 3d benches, in Direct3d AND in OpenGL.
Sorry about that, but if you want to have the best perf (but not stability), just use winME.

[/b]

Completely and utterly false. OpenGL is often faster on Win2K than on Win9x.

  • Matt

OK I get all that.But what’s still confusing me is,I ran the EXACT same app (nothing was changed in the code) and I got that 40% FPS drop.Like I said,it ran on WinME at 100fps and then on Win2K at ~60fps. Now, whether my counter code is wrong or not,this still implies a big frame rate drop.I just want a simple answer as to why this happened.I changed NOTHING in the code.

And another thing.(And maybe I don’t understand this point)If you guys are telling me that the max frame rate I can get at 75Hz refresh rate is 75FPS when drawing NOTHING on screen in OGL,then what the hell did I spend $514 CAN on a GeForce2 for!?

And that brings me to another point.Howcome all the DX demo apps that come with the SDK run at reall high frame rates? (~200+fps)I’m going to go on a limb here and assume that the Microsoft counter code is correct

I just need lots of clarification here.

[This message has been edited by TheGecko (edited 03-29-2001).]

Originally posted by TheGecko:
[b]And another thing.(And maybe I don’t understand this point)If you guys are telling me that the max frame rate I can get at 75Hz refresh rate is 75FPS when drawing NOTHING on screen in OGL,then what the hell did I spend $514 CAN on a GeForce2 for!?

And that brings me to another point.Howcome all the DX demo apps that come with the SDK run at reall high frame rates? (~200+fps)I’m going to go on a limb here and assume that the Microsoft counter code is correct [/b]

OK, I’ll try to explain this one…

Usually, how do we calculate our FPS ???

  1. We take current time t1.
  2. We render the scene.
  3. We call glFinish.
  4. We take current time t2.
  5. We call wglSwapBuffers.
  6. Go back to 1)

Then, one frame took t2-t1 to be drawn. So you can have 1/(t2-t1) frames per seconds (if t1 and t2 are in seconds of course ! Otherwise, simply convert them !).

Actually, you would probably average these rendering times over 10 frames rather than doing it for only 1 but that’s up to you…

Now, let’s try to explain why you can only reach 75FPS at 75Hz (or xxxFPS at xxxHz for that matter !).

If your VSYNC is ON (which means the wglSwapBuffers command will WAIT for the VBLANK signal to be issued before swapping the buffers !), your rendering will at least take ONE frame (over the 75 available if you run at 75Hz !). Another way to understand that is to say:

A) Say I am at stage 1) in my rendering and my monitor is on frame 1.
B) When I reach stage 5) (wglSwapBuffers), the monitor will go to frame 2 (because wglSwapBuffers will wait for that) ! Remember that this supposes that your rendering did not take you to frame 2 already !
C) When I arrive to stage 6) and go back to 1) for rendering again, I am, in the best case, on frame 2 !!!

What does it mean ??? One rendering loop=at least 1 frame for your monitor (cannot be less, but can be more !).
At 75Hz, you have 75 frames available so your max speed will be 75FPS !!!

Now, if VSYNC is OFF, wglSwapBuffers will NOT WAIT for the VBLANK signal so your app can reach 200FPS+ (like the DX8 demos you mention).

I hope this is clear… Don’t hesitate to “reply with quote” if some (all ? ) parts of this message are unclear…

Best regards.

Eric

When you say you’re using the latest dets from nVIDIA; are you really??

Are you using the 7.68s that are just out and approved by the WHQL??

Also, if your app. is coded using GLUT it will favour 9x/Me as it does not take advantage of the FASTER double/triple buffering support provided by 2k. It is important to have SP1 and if you have a motherboard with a VIA chipset then you should install the fix on the MS Win2k website. As for 2k slowing you down; that just shouldn’t happen.

I have a small program (it doesn’t use GLUT, I do the windowing code myself) that just renders a simple BSP map and I get 2300fps with VSYNC off under 2k and 1600fps under Me with the 7.68 dets on a geForce 256 DDR so your blank app is running with some massive overhead - this is (I’m afraid) down to the very inefficient way in which GLUT works.

Go to http://nehe.gamedev.net and rip his windowing code. Also, use DirectX for the input as it’s more responsive and again has less overhead than GLUT.

Oh, and install DirectX 8.0 if you haven’t already.

Hope it helps,

Stephen

Actually the fact that you can’t get more than 60 fps on win2K with vsync on is a driver bug, I found a fix somewhere for detonator 3 v.6.31, but don’t remember where…
Anyway, the new driver will be available soon, probably they’ll have fixed it !

Originally posted by Asshen Shugar:
Actually the fact that you can’t get more than 60 fps on win2K with vsync on is a driver bug

Well, if you were running at 75Hz and you can only reach 60FPS, I agree, it’s a bug… But if you are running at 60Hz, YOU CANNOT HAVE MORE THAN 60FPS WITH VSYNC ON ! And if you manage to have more, that is when there is a bug !

Regards.

Eric