mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 12:57:18 +02:00
#19261 - Add startup time to the main window title, fit to screen
This commit is contained in:
parent
fc8c0498cf
commit
39df647dcb
1 changed files with 7 additions and 2 deletions
|
@ -893,9 +893,11 @@ void display(void)
|
||||||
|
|
||||||
// If application has just started, report time from startup to now (first frame display)
|
// If application has just started, report time from startup to now (first frame display)
|
||||||
if (justStarted) {
|
if (justStarted) {
|
||||||
printf("Startup Time: %4.2f\n",
|
float startupTime = (usecTimestampNow() - usecTimestamp(&applicationStartupTime))/1000000.0;
|
||||||
(usecTimestampNow() - usecTimestamp(&applicationStartupTime))/1000000.0);
|
|
||||||
justStarted = false;
|
justStarted = false;
|
||||||
|
char title[30];
|
||||||
|
sprintf(title, "Interface: %4.2f seconds", startupTime);
|
||||||
|
glutSetWindowTitle(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1463,6 +1465,9 @@ int main(int argc, const char * argv[])
|
||||||
AgentList::getInstance()->startPingUnknownAgentsThread();
|
AgentList::getInstance()->startPingUnknownAgentsThread();
|
||||||
|
|
||||||
glutInit(&argc, (char**)argv);
|
glutInit(&argc, (char**)argv);
|
||||||
|
WIDTH = glutGet (GLUT_SCREEN_WIDTH);
|
||||||
|
HEIGHT = glutGet (GLUT_SCREEN_HEIGHT);
|
||||||
|
|
||||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
glutInitWindowSize(WIDTH, HEIGHT);
|
glutInitWindowSize(WIDTH, HEIGHT);
|
||||||
glutCreateWindow("Interface");
|
glutCreateWindow("Interface");
|
||||||
|
|
Loading…
Reference in a new issue