Jump to content
  • Advertisement
Sign in to follow this  
grinliz

Framerate stutters in VS 2005

This topic is 4318 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I recently moved my C++ OpenGL game engine (http://grinninglizard.com/lilith/) to VS 2005. When compiled on 2005, the graphics stutter horribly: one frame will take 40ms to draw, the next 20ms, the next 45ms, etc. The average speed remains the same as it did in VC 6. The engine works fine on VC6, mingw, and Mac XCode. Only 2005 shows this stuttering. The problem occurs in both Debug and Release, but I haven't found anything from profiling to point to the problem. (Since the average framerate is unchanged, it may simply average out of a profile run). What comes to mind is a problem either with 1) the STL implemenation (memory flushing?) or 2) compiler settings. Any guidance on what the problem might be? Has anyone else seen this? thanks

Share this post


Link to post
Share on other sites
Advertisement
The numbers you give make me suspect it has something to do with V-Sync. Have you tried turning it off from your driver settings and run the game?

Share this post


Link to post
Share on other sites
Since you mention the STL implementation as a possible suspect, you might want to know that VS2k5 performs bounds checking on vector's operator[]

You can disable that with a macro (can't remember its name, but you can probably google it)

Share this post


Link to post
Share on other sites
mikeman --

I know what you mean...they are all within that 30ms error one would expect. I think I have vsync turned off (although the driver settings don't make that perfectly clear, so I'll check at runtime). However, more telling, Lilith3D works when I compile the source on the same machine...so I think it has to be a compiler setting.

Share this post


Link to post
Share on other sites
Spoonbender --

You may have hit on something there. I did, but I assumed it was only in debug mode. That may be a wildly incorrect assumption - for security reasons, they may check in release mode as well. I'll look in to that.

Share this post


Link to post
Share on other sites
What kind of system are you running it on ? Could it be that the huge .net 2005 application is taking so many system resources its slowing down your app when its running at the same time ? Will the same executable run slowly even if .net is not open ?

Quote:

Since you mention the STL implementation as a possible suspect, you might want to know that VS2k5 performs bounds checking on vector's operator[]

You can disable that with a macro (can't remember its name, but you can probably google it)


I had no luck googling this... Does anyone know what this macro is,and whether it will still do these checks in release mode (that would be REALLY bad IMO).

Share this post


Link to post
Share on other sites
This may not be much help, but I'm working on a 3D engine with DirectX and C#. I noticed that the few threads I use in my application (I use them on loading screens for grabbing resources while animating a fancy interactive progress bar), crawl to a halt when running a debug build in Visual Studio 2005. I believe the overhead of VS 2005 and the debugger are eating up all the cpu time leaving very little for my thread. If I run the app myself all is good. My machine is ageing, so I suspect this is most likely the cause.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!