How to get FPS?
- I want to make an app that shows my FPS.How do I do that?
Risposte
We can only assume that what you ask is what you need help with. Now that you have showed you have made an effort, we can guide you further. Let's start with the code you posted. Environment.Tickcount "Gets the number of milliseconds elapsed since the system started. " This is not what you seek. So that post can be tossed aside. Next, we note that FPS is a GPU counter. As far as I am aware there is no builtin GPU performance monitoring in windows. So, you can go to a website like the nvidia developer site in order to start moving in the correct direction.
Good coding involves knowing one's logical limits and expanding them as necessary.- Contrassegnato come rispostaHarry ZhuMSFT, Moderatorevenerdì 13 novembre 2009 4.39
Tutte le risposte
- Start by trying.
Good coding involves knowing one's logical limits and expanding them as necessary. - Wow that's really fair considering the fact that you don't know what I've done.....But I HAVE looked it up on google, found code for it:
public class Utility { #region Basic Frame Counter private static int lastTick; private static int lastFrameRate; private static int frameRate; public static int CalculateFrameRate() { if (System.Environment.TickCount - lastTick >= 1000) { lastFrameRate = frameRate; frameRate = 0; lastTick = System.Environment.TickCount; } frameRate++; return lastFrameRate; } #endregion }This code always seemed to return the number 2.I'm just an amateur which is why I'm seeking your professional help.Thank you! We can only assume that what you ask is what you need help with. Now that you have showed you have made an effort, we can guide you further. Let's start with the code you posted. Environment.Tickcount "Gets the number of milliseconds elapsed since the system started. " This is not what you seek. So that post can be tossed aside. Next, we note that FPS is a GPU counter. As far as I am aware there is no builtin GPU performance monitoring in windows. So, you can go to a website like the nvidia developer site in order to start moving in the correct direction.
Good coding involves knowing one's logical limits and expanding them as necessary.- Contrassegnato come rispostaHarry ZhuMSFT, Moderatorevenerdì 13 novembre 2009 4.39

