Archived

This topic is now archived and is closed to further replies.

arone

not the standard refresh rate/performance question

Recommended Posts

I'm working on a medical application that renders volumetric data using a set of parallel quads and 2D textures. It's slow when I start it up (around 12 FPS) but when I change the monitor refresh rate (without closing the application down) something happens - I get around 30 FPS then. Strange thing is, it doesn't matter if I launch the app in 75 Hz mode and switch to 60 Hz (or 70, or 72 - it doesn't seem to matter) or the other way around; also, keeping the application running, after the first change I can change back to 75 Hz and performance is still good. If I then restart the application it's slow again, until I change the refresh rate. Seems like the card needs some poking to gain proper speed!? Using "VSync always off" in the display properties dialog doesn't change things either. This problem shows on GeforceFX cards (I've tried 5900, 5900 Ultra, 5700 Ultra and 5600) but not on Geforce4 TI cards. I've been using different Detonator drivers between 44.03 and 53.03. The application is developed using C# and the CsGL 1.4.1 OpenGL/.Net wrapper. The 3D engine is pure C++. What could possibly cause this behavior!? Does anyone know what might happen when the refresh rate is changed? Any other ideas? [edited by - arone on January 16, 2004 7:27:31 AM]

Share this post


Link to post
Share on other sites
To change the refresh rate the application will typically use the wglSwapIntervalEXT(int) function from the WGL_EXT_swap_control extension. The integer being set is the minimum number of monitor refreshes before the buffers are swapped. If the value is set to 0 vsynch will be off, and if it''s set to 1 it will be on. The problem may be due to the fact that the the argument was mistyped as 2, which would cut the normal refresh rate in half (every second refresh the buffer would be written to video memory). Then the code for switching refresh rates while running calls the function again but this call gives it an argument of 1. To test this possibility set the refresh to 60 and fps should be 30 to start. Then set it to 75 and refresh should be 37.5 to start.

Share this post


Link to post
Share on other sites
Would you suggest that this is a driver issue? Like I said, it works fine on Geforce4TI but not on the FX5x00. Or is there something about the OpenGL setup that could possibly cause this? I have also a demo of the 3D engine which shows pretty much the opposite behavior: it runs smooth when I start it (around 30 FPS) but then, sometimes (not every time) when I change the monitor refresh rate, it''s slow (12-15 FPS) and it stays slow even if I change the refresh rate back.

Share this post


Link to post
Share on other sites
Turns out the order in which my different OpenGL contexts are created matters. I''ve got one large view and a few smaller views; each one is a separate .Net Control with its own OpenGL context. If I create the large view (with all the textures) first, it''s fast. If I create any other view first, the large 3D view becomes slow. Fishy, but this workaround is ok for me at the moment so I''ll stick to it.

Share this post


Link to post
Share on other sites
Hm...so the last comment I made implied that the order in which things were created seemed to matter. Well this doesn''t hold all the time; it''s usually slow on FX cards. But I realised that I can speed the application up once it has been started by reloading the display driver using RivaTuner. Then it behaves just like when I changed the refresh rate. Fishy, huh!? Any ideas are greatly appreciated.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think you should mail nVidia about your problems, maybe they are caused by driver bugs or something...

Share this post


Link to post
Share on other sites