Dave2001
Moderator
Hi!
I have a question to ask:
I'm having trouble with the fps counter in Glide64. Since Glide64 must be run in fullscreen, the pj64 fps counter is not an option to look at. On my fps counter, I get 30 fps when Mario is running full speed, and 20 fps (!) when Zelda is running full speed. This is obviously not correct since Zelda is NOT running at 20 fps... This is when I'm updating the frame count every time the buffer is swapped.
The FPS counter seems to show 60 / number of UpdateScreen()s per ProcessDList(). When I place the frame counter at the beginning of UpdateScreen() instead of where the buffer is swapped, I get values that seem correct; 60 consistently. But this SHOULDN'T be correct, it is adding 2+ frames to the counter per buffer swap!
Here's the FPS code, but I'm pretty sure it's correct.
if (fullscreen)
{
LOG ("BUFFER SWAPPED\n");
grBufferSwap (0);
#ifdef FPS
// Check frames per second
fps_count ++;
if (fps_count >= 30)
{
LARGE_INTEGER difference;
QueryPerformanceCounter (&fps_next);
difference.QuadPart = fps_next.QuadPart - fps_last.QuadPart;
fps = 30.0f / (float)((double)difference.QuadPart / (double)perf_freq.QuadPart);
fps_last = fps_next;
fps_count = 0;
}
#endif
}
this means that on every 30th frame, calculate the FPS.
Any clue to why this might happen?
Btw, these are the functions that are being called:
Mario (30 fps):
ProcessDList ()
UpdateScreen () <- BUFFER SWAPPED HERE
UpdateScreen ()
... repeated & repeated
Zelda (20 fps):
ProcessDList ()
UpdateScreen () <- BUFFER SWAPPED HERE
UpdateScreen ()
UpdateScreen ()
...
Zelda (part that runs at 60 fps):
ProcessDList ()
UpdateScreen () <- BUFFER SWAPPED HERE
...
Obviously it somehow is depending on the number of UpdateScreens, but WHY? ???
I have a question to ask:
I'm having trouble with the fps counter in Glide64. Since Glide64 must be run in fullscreen, the pj64 fps counter is not an option to look at. On my fps counter, I get 30 fps when Mario is running full speed, and 20 fps (!) when Zelda is running full speed. This is obviously not correct since Zelda is NOT running at 20 fps... This is when I'm updating the frame count every time the buffer is swapped.
The FPS counter seems to show 60 / number of UpdateScreen()s per ProcessDList(). When I place the frame counter at the beginning of UpdateScreen() instead of where the buffer is swapped, I get values that seem correct; 60 consistently. But this SHOULDN'T be correct, it is adding 2+ frames to the counter per buffer swap!
Here's the FPS code, but I'm pretty sure it's correct.
if (fullscreen)
{
LOG ("BUFFER SWAPPED\n");
grBufferSwap (0);
#ifdef FPS
// Check frames per second
fps_count ++;
if (fps_count >= 30)
{
LARGE_INTEGER difference;
QueryPerformanceCounter (&fps_next);
difference.QuadPart = fps_next.QuadPart - fps_last.QuadPart;
fps = 30.0f / (float)((double)difference.QuadPart / (double)perf_freq.QuadPart);
fps_last = fps_next;
fps_count = 0;
}
#endif
}
this means that on every 30th frame, calculate the FPS.
Any clue to why this might happen?
Btw, these are the functions that are being called:
Mario (30 fps):
ProcessDList ()
UpdateScreen () <- BUFFER SWAPPED HERE
UpdateScreen ()
... repeated & repeated
Zelda (20 fps):
ProcessDList ()
UpdateScreen () <- BUFFER SWAPPED HERE
UpdateScreen ()
UpdateScreen ()
...
Zelda (part that runs at 60 fps):
ProcessDList ()
UpdateScreen () <- BUFFER SWAPPED HERE
...
Obviously it somehow is depending on the number of UpdateScreens, but WHY? ???
Last edited: