So my game was running around 50 FPS, but then I reworked my terrain by implimenting GeoMipMapping, and sending my entity draw calls to a frustrum check instead of just rendering all entities.
I'm now pushing 170 fps, and my laptops fan ramps up and gets loud. I'm assuming this will cook the GPU after a while.
Is there a way to figure out how much to sleep given the FPS? I want to get it back down to 60ish fps (or some lower value).
So you were running at 50fps, then implemented rendering-related optimizations, and now run much faster. So, it sounds like you were (or still are) GPU-bound, which means that previously your CPU was sitting around waiting for the GPU to finish. Now that the GPU does less work, the CPU waits less, and so it does more work. More work means it gets hotter, so the fan ramps up.
Options:
1. wait for vsync, which should automatically limit it to 60fps
2. put in code at the beginning of each frame to determine the frametime, and sleep until it reaches your target max framerate.
3. dont do anything and let it run as fast as it can.
Running the CPU as fast as possible should not be an issue. If it is then you need to look at options like underclocking, or maybe open it up and make sure the heatsync isnt clogged with dust, or stuff like that.
BTW for mobile games, limiting the framerate of your game might be a good idea in order to save battery life. You could even make it an option that the user can select. Just something to think about.