History

Refactor startup timing a little by getting the current time the moment the application enters its main function, then passing that to Application's constructor. Also fix the titlebar bug by setting the title bar at the end of initializeGL() instead of at the end of the first frame (which would actually further the inaccuracy of the startup time).

Geenz committed 13 years ago

Commit fb553fc1 parent a8c4e923 files · +43 −41Browse files

Showing the changes to interface/src/main.cpp (1 of 3 files). Show all

Unified · Split

interface/src/main.cpp+31−28
@@ -1,28 +1,31 @@
1−//
2−// Interface
3−//
4−// Allows you to connect to and see/hear the shared 3D space.
5−// Optionally uses serialUSB connection to get gyro data for head movement.
6−// Optionally gets UDP stream from transmitter to animate controller/hand.
7−//
8−// Usage: The interface client first attempts to contact a domain server to
9−// discover the appropriate audio, voxel, and avatar servers to contact.
10−// Right now, the default domain server is "highfidelity.below92.com"
11−// You can change the domain server to use your own by editing the
12−// DOMAIN_HOSTNAME or DOMAIN_IP strings in the file AgentList.cpp
13−//
14−//
15−// Welcome Aboard!
16−//
17−
18−#include "Application.h"
19−#include "Log.h"
20−
21−int main(int argc, const char * argv[]) {
22−
23− Application app(argc, const_cast<char**>(argv));
24− printLog( "Created QT Application.\n" );
25− int exitCode = app.exec();
26− printLog("Normal exit.\n");
27− return exitCode;
28−}
1+//
2+// Interface
3+//
4+// Allows you to connect to and see/hear the shared 3D space.
5+// Optionally uses serialUSB connection to get gyro data for head movement.
6+// Optionally gets UDP stream from transmitter to animate controller/hand.
7+//
8+// Usage: The interface client first attempts to contact a domain server to
9+// discover the appropriate audio, voxel, and avatar servers to contact.
10+// Right now, the default domain server is "highfidelity.below92.com"
11+// You can change the domain server to use your own by editing the
12+// DOMAIN_HOSTNAME or DOMAIN_IP strings in the file AgentList.cpp
13+//
14+//
15+// Welcome Aboard!
16+//
17+
18+#include "Application.h"
19+#include "Log.h"
20+
21+int main(int argc, const char * argv[]) {
22+
23+ timeval startup_time;
24+ gettimeofday(&startup_time, NULL);
25+
26+ Application app(argc, const_cast<char**>(argv), startup_time);
27+ printLog( "Created QT Application.\n" );
28+ int exitCode = app.exec();
29+ printLog("Normal exit.\n");
30+ return exitCode;
31+}