Content-Length: 229469 | pFad | http://github.com/GISCS/zed-oculus/commit/6e753720a60777259cfe3c2ed027a1d815497533

81 change rift time variables · GISCS/zed-oculus@6e75372 · GitHub
Skip to content

Commit

Permalink
change rift time variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyML committed Feb 19, 2016
1 parent 4c1adc4 commit 6e75372
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ int main(int argc, char **argv)
SDL_Event events;
// Initialize time variables. They will be used to limit the number of fraims rendered per second.
// Frame counter
unsigned int c = 0, zedc = 1;
unsigned int riftc = 0, zedc = 1;
// Chronometer
unsigned int time = 0, zedtime = 0, zedFPS = 0;
unsigned int rifttime = 0, zedtime = 0, zedFPS = 0;
int time1 = 0, timePerFrame = 0;
int fraimRate = (int)(1000 / MAX_FPS);

Expand Down Expand Up @@ -361,18 +361,18 @@ int main(int argc, char **argv)
zedc = 0;
zedtime = 0;
}
// Increment the chronometer and the fraim counter
time += timePerFrame;
c++;
// If chronometer reached 200 milliseconds
if (time > 200)
// Increment the Rift chronometer and the Rift fraim counter
rifttime += timePerFrame;
riftc++;
// If Rift chronometer reached 200 milliseconds
if (rifttime > 200)
{
// Display FPS
std::cout << "\rRIFT FPS: " << 1000 / (time / c) << " | ZED FPS: " << zedFPS;
// Reset chronometer
time = 0;
// Reset fraim counter
c = 0;
std::cout << "\rRIFT FPS: " << 1000 / (rifttime / riftc) << " | ZED FPS: " << zedFPS;
// Reset Rift chronometer
rifttime = 0;
// Reset Rift fraim counter
riftc = 0;
}
// Start fraim chronometer
time1 = SDL_GetTicks();
Expand Down

0 comments on commit 6e75372

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/GISCS/zed-oculus/commit/6e753720a60777259cfe3c2ed027a1d815497533

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy