I am just making a renderer in directx for my game.
Initially my code was all inlined for testing purposes and I was getting a framerate of ~6000 FPS (Not practical I know).
But now I have started cleaning up my code and placing it all into appropriate functions.
For ease of use I made the D3DDevice global amongst half a dozen other things and now the framerate has dropped to only ~500 FPS.
I have stripped everything out of the main loop (and render loop) and only left my framerate counter (same as I used earlier) and I still get the reduced framerate. I have built in release mode, using the release DLL's.
But the only thing I can think of now is that the refernece to the global variables.
Is it possible that the globals are slowing things down?
Thanks in advance
Note: I will lock the framerate to 60 FPS when I have my framework sorted out, but I still want the logic to run as fast as possible.