History

Merge branch 'master' of https://github.com/worklist/hifi

Philip Rosedale committed 12 years ago

Commit 729d3cf2 parents 21a15cf c535d0128 files · +234 −417Browse files

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

Unified · Split

interface/src/Application.cpp+11−7
@@ -293,9 +293,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 292 unmodified lines
293 // set the account manager's root URL and trigger a login request if we don't have the access token293 // set the account manager's root URL and trigger a login request if we don't have the access token
294 accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL);294 accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL);
295 UserActivityLogger::getInstance().launch(applicationVersion());295 UserActivityLogger::getInstance().launch(applicationVersion());
296
297 // grab the location manager instance early so it lives in our thread
298 LocationManager::getInstance();
299 296
300 // once the event loop has started, check and signal for an access token297 // once the event loop has started, check and signal for an access token
301 QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection);298 QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection);
@@ -1450,6 +1447,14 @@ void Application::checkBandwidthMeterClick() { · 1148 unmodified lines
1450}1447}
1451 1448
1452void Application::setFullscreen(bool fullscreen) {1449void Application::setFullscreen(bool fullscreen) {
1450 if (Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode)) {
1451 if (fullscreen) {
1452 // Menu show() after hide() doesn't work with Rift VR display so set height instead.
1453 _window->menuBar()->setMaximumHeight(0);
1454 } else {
1455 _window->menuBar()->setMaximumHeight(QWIDGETSIZE_MAX);
1456 }
1457 }
1453 _window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :1458 _window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :
1454 (_window->windowState() & ~Qt::WindowFullScreen));1459 (_window->windowState() & ~Qt::WindowFullScreen));
1455}1460}
@@ -2730,7 +2735,8 @@ void Application::setupWorldLight() { · 1274 unmodified lines
2730QImage Application::renderAvatarBillboard() {2735QImage Application::renderAvatarBillboard() {
2731 _textureCache.getPrimaryFramebufferObject()->bind();2736 _textureCache.getPrimaryFramebufferObject()->bind();
2732 2737
2733 glDisable(GL_BLEND);2738 // the "glow" here causes an alpha of one
2739 Glower glower;
2734 2740
2735 const int BILLBOARD_SIZE = 64;2741 const int BILLBOARD_SIZE = 64;
2736 renderRearViewMirror(QRect(0, _glWidget->getDeviceHeight() - BILLBOARD_SIZE, BILLBOARD_SIZE, BILLBOARD_SIZE), true);2742 renderRearViewMirror(QRect(0, _glWidget->getDeviceHeight() - BILLBOARD_SIZE, BILLBOARD_SIZE, BILLBOARD_SIZE), true);
@@ -2738,8 +2744,6 @@ QImage Application::renderAvatarBillboard() { · 1 unmodified line
2738 QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32);2744 QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32);
2739 glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits());2745 glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits());
2740 2746
2741 glEnable(GL_BLEND);
2742
2743 _textureCache.getPrimaryFramebufferObject()->release();2747 _textureCache.getPrimaryFramebufferObject()->release();
2744 2748
2745 return image;2749 return image;
@@ -4164,7 +4168,7 @@ void Application::takeSnapshot() { · 1418 unmodified lines
4164 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));4168 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));
4165 player->play();4169 player->play();
4166 4170
4167 QString fileName = Snapshot::saveSnapshot(_glWidget, _myAvatar);4171 QString fileName = Snapshot::saveSnapshot();
4168 4172
4169 AccountManager& accountManager = AccountManager::getInstance();4173 AccountManager& accountManager = AccountManager::getInstance();
4170 if (!accountManager.isLoggedIn()) {4174 if (!accountManager.isLoggedIn()) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t