Jump to content
  • Advertisement
Sign in to follow this  
Bloody

Slow exe despite of fast code - strange problem, please help!

This topic is 4834 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

hi all, i've got a really strange problem - programmed a little game with openGL, When compiling using Visual C and then running, it works well but when you copy the .exe file stored in the debug directory to some other place, it starts running really slow! (if you run the .exe from the debug directory but outside VC, it works well too...) i wanna send it to my none-programmers friends... what to do? :( the code can be found here: http://www.angelfire.com/musicals/bloody4/project.zip it's really messy though, worked under time pressure (it's a recitation for the university...) please help....

Share this post


Link to post
Share on other sites
Advertisement
I have never heard of performance being based on file location and the .exe alone doesn't even need the files that are in the directory with it when you compile it. I mean the .obj files. First of all, make sure you still keep release mode. Then try running a profiler on it to see if for some reason, the change in directory causes some function to go slower.

Share this post


Link to post
Share on other sites
Are you relying on any .dll files? Perhaps there is a new version in your executable's directory but a older (and slower) one in the C:\windows\system32 directory? That would be my best guess.

Share this post


Link to post
Share on other sites
Darn that's messy.
1. there is a alarming numbers if glBindTexture calls everywhere.
2. the movement code is a bit complicated, i couldn't even understand it.
3. You are using GLUT, glut may be easy but it's not prefered for games, if you do use it then use a custom game loop and input functions instead of relying on GLUT for that.

Share this post


Link to post
Share on other sites
Quote:
Original post by luizribeiro
Why not use GLUT for games? What's the best choice to keep the application multi-platform then?


SDL.
Or write your own library. [wink]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!