Merge branch 'master' of https://github.com/highfidelity/hifi into metavoxels

This commit is contained in:
Andrzej Kapolka 2014-10-30 16:52:42 -07:00
commit 8ce9521604
10 changed files with 2074 additions and 124 deletions

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 193 KiB

View file

@ -585,7 +585,7 @@ void Application::initializeGL() {
// update before the first render
update(1.f / _fps);
InfoView::showFirstTime();
InfoView::showFirstTime(INFO_HELP_PATH);
}
void Application::paintGL() {
@ -1558,12 +1558,9 @@ void Application::setEnableVRMode(bool enableVRMode) {
OculusManager::disconnect();
OculusManager::connect();
}
int oculusMaxFPS = Menu::getInstance()->getOculusUIMaxFPS();
setRenderTargetFramerate(oculusMaxFPS);
OculusManager::recalibrate();
} else {
OculusManager::abandonCalibration();
setRenderTargetFramerate(0);
}
resizeGL(_glWidget->getDeviceWidth(), _glWidget->getDeviceHeight());

View file

@ -128,6 +128,9 @@ static const float MIRROR_FIELD_OF_VIEW = 30.0f;
static const quint64 TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS = 1 * USECS_PER_SECOND;
static const QString INFO_HELP_PATH = "html/interface-welcome-allsvg.html";
static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-entities-commands.html";
class Application : public QApplication {
Q_OBJECT

View file

@ -105,7 +105,6 @@ Menu::Menu() :
_maxVoxels(DEFAULT_MAX_VOXELS_PER_SYSTEM),
_voxelSizeScale(DEFAULT_OCTREE_SIZE_SCALE),
_oculusUIAngularSize(DEFAULT_OCULUS_UI_ANGULAR_SIZE),
_oculusUIMaxFPS(DEFAULT_OCULUS_UI_MAX_FPS),
_sixenseReticleMoveSpeed(DEFAULT_SIXENSE_RETICLE_MOVE_SPEED),
_invertSixenseButtons(DEFAULT_INVERT_SIXENSE_MOUSE_BUTTONS),
_automaticAvatarLOD(true),
@ -359,6 +358,7 @@ Menu::Menu() :
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Bandwidth, 0, true);
addActionToQMenuAndActionHash(viewMenu, MenuOption::BandwidthDetails, 0, this, SLOT(bandwidthDetails()));
addActionToQMenuAndActionHash(viewMenu, MenuOption::OctreeStats, 0, this, SLOT(octreeStatsDetails()));
addActionToQMenuAndActionHash(viewMenu, MenuOption::EditEntitiesHelp, 0, this, SLOT(showEditEntitiesHelp()));
QMenu* developerMenu = addMenu("Developer");
@ -783,8 +783,6 @@ void Menu::loadSettings(QSettings* settings) {
settings->endGroup();
_walletPrivateKey = settings->value("privateKey").toByteArray();
_oculusUIMaxFPS = loadSetting(settings, "oculusUIMaxFPS", 0.0f);
scanMenuBar(&loadAction, settings);
Application::getInstance()->getAvatar()->loadData(settings);
@ -846,9 +844,6 @@ void Menu::saveSettings(QSettings* settings) {
settings->setValue("viewFrustumOffsetUp", _viewFrustumOffset.up);
settings->endGroup();
settings->setValue("privateKey", _walletPrivateKey);
// Oculus Rift settings
settings->setValue("oculusUIMaxFPS", _oculusUIMaxFPS);
scanMenuBar(&saveAction, settings);
Application::getInstance()->getAvatar()->saveData(settings);
@ -1117,7 +1112,11 @@ QAction* Menu::getActionForOption(const QString& menuOption) {
}
void Menu::aboutApp() {
InfoView::forcedShow();
InfoView::forcedShow(INFO_HELP_PATH);
}
void Menu::showEditEntitiesHelp() {
InfoView::forcedShow(INFO_EDIT_ENTITIES_PATH);
}
void Menu::bumpSettings() {

View file

@ -100,8 +100,6 @@ public:
void setRealWorldFieldOfView(float realWorldFieldOfView) { _realWorldFieldOfView = realWorldFieldOfView; bumpSettings(); }
float getOculusUIAngularSize() const { return _oculusUIAngularSize; }
void setOculusUIAngularSize(float oculusUIAngularSize) { _oculusUIAngularSize = oculusUIAngularSize; bumpSettings(); }
int getOculusUIMaxFPS() const { return _oculusUIMaxFPS; }
void setOculusUIMaxFPS(int oculusUIMaxFPS) { _oculusUIMaxFPS = oculusUIMaxFPS; bumpSettings(); }
float getSixenseReticleMoveSpeed() const { return _sixenseReticleMoveSpeed; }
void setSixenseReticleMoveSpeed(float sixenseReticleMoveSpeed) { _sixenseReticleMoveSpeed = sixenseReticleMoveSpeed; bumpSettings(); }
bool getInvertSixenseButtons() const { return _invertSixenseButtons; }
@ -208,6 +206,7 @@ public slots:
private slots:
void aboutApp();
void showEditEntitiesHelp();
void bumpSettings();
void editPreferences();
void editAttachments();
@ -294,7 +293,6 @@ private:
int _maxVoxels;
float _voxelSizeScale;
float _oculusUIAngularSize;
int _oculusUIMaxFPS;
float _sixenseReticleMoveSpeed;
bool _invertSixenseButtons;
bool _automaticAvatarLOD;
@ -398,6 +396,7 @@ namespace MenuOption {
const QString DontFadeOnVoxelServerChanges = "Don't Fade In/Out on Voxel Server Changes";
const QString EchoLocalAudio = "Echo Local Audio";
const QString EchoServerAudio = "Echo Server Audio";
const QString EditEntitiesHelp = "Edit Entities Help...";
const QString Enable3DTVMode = "Enable 3DTV Mode";
const QString EnableGlowEffect = "Enable Glow Effect (Warning: Poor Oculus Performance)";
const QString EnableVRMode = "Enable VR Mode";

View file

@ -21,7 +21,6 @@
#include "ui/overlays/Text3DOverlay.h"
const float DEFAULT_OCULUS_UI_ANGULAR_SIZE = 72.0f;
const int DEFAULT_OCULUS_UI_MAX_FPS = 75;
class Camera;
class PalmData;

View file

@ -20,24 +20,24 @@
#define SETTINGS_VERSION_KEY "info-version"
#define MAX_DIALOG_HEIGHT_RATIO 0.9
InfoView::InfoView(bool forced) :
InfoView::InfoView(bool forced, QString path) :
_forced(forced)
{
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint);
QString absPath = QFileInfo(Application::resourcesPath() + "html/interface-welcome-allsvg.html").absoluteFilePath();
QString absPath = QFileInfo(Application::resourcesPath() + path).absoluteFilePath();
QUrl url = QUrl::fromLocalFile(absPath);
load(url);
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loaded(bool)));
}
void InfoView::showFirstTime() {
new InfoView(false);
void InfoView::showFirstTime(QString path) {
new InfoView(false, path);
}
void InfoView::forcedShow() {
new InfoView(true);
void InfoView::forcedShow(QString path) {
new InfoView(true, path);
}
bool InfoView::shouldShow() {

View file

@ -17,11 +17,11 @@
class InfoView : public QWebView {
Q_OBJECT
public:
static void showFirstTime();
static void forcedShow();
static void showFirstTime(QString path);
static void forcedShow(QString path);
private:
InfoView(bool forced);
InfoView(bool forced, QString path);
bool _forced;
bool shouldShow();

View file

@ -147,8 +147,6 @@ void PreferencesDialog::loadPreferences() {
ui.maxVoxelsPPSSpin->setValue(menuInstance->getMaxVoxelPacketsPerSecond());
ui.oculusUIAngularSizeSpin->setValue(menuInstance->getOculusUIAngularSize());
ui.oculusUIMaxFPSSpin->setValue(menuInstance->getOculusUIMaxFPS());
ui.sixenseReticleMoveSpeedSpin->setValue(menuInstance->getSixenseReticleMoveSpeed());
@ -231,8 +229,6 @@ void PreferencesDialog::savePreferences() {
Menu::getInstance()->setMaxVoxelPacketsPerSecond(ui.maxVoxelsPPSSpin->value());
Menu::getInstance()->setOculusUIAngularSize(ui.oculusUIAngularSizeSpin->value());
Menu::getInstance()->setOculusUIMaxFPS(ui.oculusUIMaxFPSSpin->value());
Menu::getInstance()->setSixenseReticleMoveSpeed(ui.sixenseReticleMoveSpeedSpin->value());

View file

@ -61,7 +61,7 @@
<x>0</x>
<y>0</y>
<width>500</width>
<height>1459</height>
<height>1386</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@ -1772,24 +1772,24 @@
</item>
<item>
<widget class="QLineEdit" name="faceshiftHostnameEdit">
<property name="font">
<font>
<family>Arial</family>
</font>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>localhost</string>
</property>
</widget>
<property name="font">
<font>
<family>Arial</family>
</font>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>localhost</string>
</property>
</widget>
</item>
</layout>
</item>
</item>
<item>
<widget class="QLabel" name="voxelsTitleLabel">
<property name="sizePolicy">
@ -2084,85 +2084,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>7</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>7</number>
</property>
<item>
<widget class="QLabel" name="label_15">
<property name="font">
<font>
<family>Arial</family>
</font>
</property>
<property name="text">
<string>Oculus Rift FPS</string>
</property>
<property name="indent">
<number>0</number>
</property>
<property name="buddy">
<cstring>maxVoxelsSpin</cstring>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_18">
<property name="font">
<font>
<family>Arial</family>
</font>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="oculusUIMaxFPSSpin">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<family>Arial</family>
</font>
</property>
<property name="minimum">
<number>30</number>
</property>
<property name="maximum">
<number>95</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>75</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="sixenseControllersTitleLabel">
<property name="sizePolicy">