Showing the changes to interface/src/Application.cpp (1 of 41 files). Show all
Unified · Split
| @@ -68,6 +68,7 @@ · 67 unmodified lines | |||
| 68 | #include <InfoView.h> | 68 | #include <InfoView.h> |
| 69 | #include <input-plugins/InputPlugin.h> | 69 | #include <input-plugins/InputPlugin.h> |
| 70 | #include <controllers/UserInputMapper.h> | 70 | #include <controllers/UserInputMapper.h> |
| 71 | #include <controllers/ScriptingInterface.h> | ||
| 71 | #include <controllers/StateController.h> | 72 | #include <controllers/StateController.h> |
| 72 | #include <UserActivityLoggerScriptingInterface.h> | 73 | #include <UserActivityLoggerScriptingInterface.h> |
| 73 | #include <LogHandler.h> | 74 | #include <LogHandler.h> |
| @@ -814,7 +815,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 740 unmodified lines | |||
| 814 | { "gl_version", glContextData["version"] }, | 815 | { "gl_version", glContextData["version"] }, |
| 815 | { "gl_vender", glContextData["vendor"] }, | 816 | { "gl_vender", glContextData["vendor"] }, |
| 816 | { "gl_sl_version", glContextData["slVersion"] }, | 817 | { "gl_sl_version", glContextData["slVersion"] }, |
| 817 | { "gl_renderer", glContextData["renderer"] } | 818 | { "gl_renderer", glContextData["renderer"] }, |
| 819 | { "ideal_thread_count", QThread::idealThreadCount() } | ||
| 818 | }; | 820 | }; |
| 819 | auto macVersion = QSysInfo::macVersion(); | 821 | auto macVersion = QSysInfo::macVersion(); |
| 820 | if (macVersion != QSysInfo::MV_None) { | 822 | if (macVersion != QSysInfo::MV_None) { |
| @@ -824,6 +826,16 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 3 unmodified lines | |||
| 824 | if (windowsVersion != QSysInfo::WV_None) { | 826 | if (windowsVersion != QSysInfo::WV_None) { |
| 825 | properties["os_win_version"] = QSysInfo::windowsVersion(); | 827 | properties["os_win_version"] = QSysInfo::windowsVersion(); |
| 826 | } | 828 | } |
| 829 | |||
| 830 | ProcessorInfo procInfo; | ||
| 831 | if (getProcessorInfo(procInfo)) { | ||
| 832 | properties["processor_core_count"] = procInfo.numProcessorCores; | ||
| 833 | properties["logical_processor_count"] = procInfo.numLogicalProcessors; | ||
| 834 | properties["processor_l1_cache_count"] = procInfo.numProcessorCachesL1; | ||
| 835 | properties["processor_l2_cache_count"] = procInfo.numProcessorCachesL2; | ||
| 836 | properties["processor_l3_cache_count"] = procInfo.numProcessorCachesL3; | ||
| 837 | } | ||
| 838 | |||
| 827 | UserActivityLogger::getInstance().logAction("launch", properties); | 839 | UserActivityLogger::getInstance().logAction("launch", properties); |
| 828 | 840 | ||
| 829 | _connectionMonitor.init(); | 841 | _connectionMonitor.init(); |
| @@ -1122,6 +1134,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 292 unmodified lines | |||
| 1122 | auto displayPlugin = qApp->getActiveDisplayPlugin(); | 1134 | auto displayPlugin = qApp->getActiveDisplayPlugin(); |
| 1123 | 1135 | ||
| 1124 | properties["fps"] = _frameCounter.rate(); | 1136 | properties["fps"] = _frameCounter.rate(); |
| 1137 | properties["target_frame_rate"] = getTargetFrameRate(); | ||
| 1125 | properties["present_rate"] = displayPlugin->presentRate(); | 1138 | properties["present_rate"] = displayPlugin->presentRate(); |
| 1126 | properties["new_frame_present_rate"] = displayPlugin->newFramePresentRate(); | 1139 | properties["new_frame_present_rate"] = displayPlugin->newFramePresentRate(); |
| 1127 | properties["dropped_frame_rate"] = displayPlugin->droppedFrameRate(); | 1140 | properties["dropped_frame_rate"] = displayPlugin->droppedFrameRate(); |
| @@ -1163,6 +1176,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 35 unmodified lines | |||
| 1163 | properties["deleted_entity_cnt"] = entityActivityTracking.deletedEntityCount; | 1176 | properties["deleted_entity_cnt"] = entityActivityTracking.deletedEntityCount; |
| 1164 | properties["edited_entity_cnt"] = entityActivityTracking.editedEntityCount; | 1177 | properties["edited_entity_cnt"] = entityActivityTracking.editedEntityCount; |
| 1165 | 1178 | ||
| 1179 | properties["active_display_plugin"] = getActiveDisplayPlugin()->getName(); | ||
| 1180 | properties["using_hmd"] = isHMDMode(); | ||
| 1181 | |||
| 1166 | auto hmdHeadPose = getHMDSensorPose(); | 1182 | auto hmdHeadPose = getHMDSensorPose(); |
| 1167 | properties["hmd_head_pose_changed"] = isHMDMode() && (hmdHeadPose != lastHMDHeadPose); | 1183 | properties["hmd_head_pose_changed"] = isHMDMode() && (hmdHeadPose != lastHMDHeadPose); |
| 1168 | lastHMDHeadPose = hmdHeadPose; | 1184 | lastHMDHeadPose = hmdHeadPose; |
| @@ -2169,7 +2185,7 @@ bool Application::event(QEvent* event) { · 1000 unmodified lines | |||
| 2169 | // handle custom URL | 2185 | // handle custom URL |
| 2170 | if (event->type() == QEvent::FileOpen) { | 2186 | if (event->type() == QEvent::FileOpen) { |
| 2171 | 2187 | ||
| 2172 | QFileOpenEvent* fileEvent = static_cast<QFileOpenEvent*>(event); | 2188 | QFileOpenEvent* fileEvent = static_cast<QFileOpenEvent*>(event); |
| 2173 | 2189 | ||
| 2174 | QUrl url = fileEvent->url(); | 2190 | QUrl url = fileEvent->url(); |
| 2175 | 2191 | ||
| @@ -4353,8 +4369,13 @@ namespace render { · 2177 unmodified lines | |||
| 4353 | auto scene = DependencyManager::get<SceneScriptingInterface>()->getStage(); | 4369 | auto scene = DependencyManager::get<SceneScriptingInterface>()->getStage(); |
| 4354 | auto sceneKeyLight = scene->getKeyLight(); | 4370 | auto sceneKeyLight = scene->getKeyLight(); |
| 4355 | auto defaultSkyboxAmbientTexture = qApp->getDefaultSkyboxAmbientTexture(); | 4371 | auto defaultSkyboxAmbientTexture = qApp->getDefaultSkyboxAmbientTexture(); |
| 4356 | sceneKeyLight->setAmbientSphere(defaultSkyboxAmbientTexture->getIrradiance()); | 4372 | if (defaultSkyboxAmbientTexture) { |
| 4357 | sceneKeyLight->setAmbientMap(defaultSkyboxAmbientTexture); | 4373 | sceneKeyLight->setAmbientSphere(defaultSkyboxAmbientTexture->getIrradiance()); |
| 4374 | sceneKeyLight->setAmbientMap(defaultSkyboxAmbientTexture); | ||
| 4375 | } else { | ||
| 4376 | static QString repeatedMessage = LogHandler::getInstance().addRepeatedMessageRegex( | ||
| 4377 | "Failed to get a valid Default Skybox Ambient Texture ? probably because it couldn't be find during initialization step"); | ||
| 4378 | } | ||
| 4358 | // fall through: render defaults skybox | 4379 | // fall through: render defaults skybox |
| 4359 | } else { | 4380 | } else { |
| 4360 | break; | 4381 | break; |
| @@ -4911,6 +4932,10 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 550 unmodified lines | |||
| 4911 | scriptEngine->registerGlobalObject("Users", DependencyManager::get<UsersScriptingInterface>().data()); | 4932 | scriptEngine->registerGlobalObject("Users", DependencyManager::get<UsersScriptingInterface>().data()); |
| 4912 | 4933 | ||
| 4913 | scriptEngine->registerGlobalObject("Steam", new SteamScriptingInterface(scriptEngine)); | 4934 | scriptEngine->registerGlobalObject("Steam", new SteamScriptingInterface(scriptEngine)); |
| 4935 | |||
| 4936 | auto scriptingInterface = DependencyManager::get<controller::ScriptingInterface>(); | ||
| 4937 | scriptEngine->registerGlobalObject("Controller", scriptingInterface.data()); | ||
| 4938 | UserInputMapper::registerControllerTypes(scriptEngine); | ||
| 4914 | } | 4939 | } |
| 4915 | 4940 | ||
| 4916 | bool Application::canAcceptURL(const QString& urlString) const { | 4941 | bool Application::canAcceptURL(const QString& urlString) const { |