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

This commit is contained in:
Sam Gateau 2019-06-04 18:38:25 -07:00
commit ba30892c0e
28 changed files with 149 additions and 119 deletions

View file

@ -34,7 +34,18 @@ If you do not wish to use the Python installation bundled with Visual Studio, yo
Download and install the latest version of CMake 3.9.
Download the file named win64-x64 Installer from the [CMake Website](https://cmake.org/download/). You can access the installer on this [3.9 Version page](https://cmake.org/files/v3.9/). During installation, make sure to check "Add CMake to system PATH for all users" when prompted.
### Step 5. Running CMake to Generate Build Files
### Step 3. Create VCPKG environment variable
In the next step, you will use CMake to build High Fidelity. By default, the CMake process builds dependency files in Windows' `%TEMP%` directory, which is periodically cleared by the operating system. To prevent you from having to re-build the dependencies in the event that Windows clears that directory, we recommend that you create a `HIFI_VCPKG_BASE` environment variable linked to a directory somewhere on your machine. That directory will contain all dependency files until you manually remove them.
To create this variable:
* Naviagte to 'Edit the System Environment Variables' Through the start menu.
* Click on 'Environment Variables'
* Select 'New'
* Set "Variable name" to HIFI_VCPKG_BASE
* Set "Variable value" to any directory that you have control over.
### Step 4. Running CMake to Generate Build Files
Run Command Prompt from Start and run the following commands:
`cd "%HIFI_DIR%"`
@ -49,24 +60,28 @@ Run `cmake .. -G "Visual Studio 16 2019" -A x64`.
Where `%HIFI_DIR%` is the directory for the highfidelity repository.
### Step 6. Making a Build
### Step 5. Making a Build
Open `%HIFI_DIR%\build\hifi.sln` using Visual Studio.
Change the Solution Configuration (menu ribbon under the menu bar, next to the green play button) from "Debug" to "Release" for best performance.
Create another environment variable (see Step #4)
Create another environment variable (see Step #3)
* Set "Variable name": `PreferredToolArchitecture`
* Set "Variable value": `x64`
Restart Visual Studio for the new variable to take effect.
Run from the menu bar `Build > Build Solution`.
### Step 7. Testing Interface
### Step 6. Testing Interface
Create another environment variable (see Step #4)
Create another environment variable (see Step #3)
* Set "Variable name": `_NO_DEBUG_HEAP`
* Set "Variable value": `1`
Restart Visual Studio again.
In Visual Studio, right+click "interface" under the Apps folder in Solution Explorer and select "Set as Startup Project". Run from the menu bar `Debug > Start Debugging`.
Now, you should have a full build of High Fidelity and be able to run the Interface using Visual Studio. Please check our [Docs](https://wiki.highfidelity.com/wiki/Main_Page) for more information regarding the programming workflow.
@ -75,11 +90,11 @@ Note: You can also run Interface by launching it from command line or File Explo
## Troubleshooting
For any problems after Step #7, first try this:
For any problems after Step #6, first try this:
* Delete your locally cloned copy of the highfidelity repository
* Restart your computer
* Redownload the [repository](https://github.com/highfidelity/hifi)
* Restart directions from Step #7
* Restart directions from Step #6
#### CMake gives you the same error message repeatedly after the build fails

View file

@ -365,7 +365,7 @@ void AvatarMixer::manageIdentityData(const SharedNodePointer& node) {
// there is no need to manage identity data we haven't received yet
// so bail early if we've never received an identity packet for this avatar
if (!nodeData || !nodeData->getAvatar().hasProcessedFirstIdentity()) {
if (!nodeData || !nodeData->getAvatar().hasProcessedFirstIdentity() || !node->getActiveSocket()) {
return;
}

View file

@ -1,43 +1,41 @@
Index: hifi-interface-84/cmake/macros/SetupQt.cmake
Index: hifi/cmake/macros/SetupQt.cmake
===================================================================
--- hifi-interface-84.orig/cmake/macros/SetupQt.cmake
+++ hifi-interface-84/cmake/macros/SetupQt.cmake
@@ -18,19 +18,19 @@ function(calculate_default_qt_dir _QT_VE
elseif(WIN32)
set(QT_DEFAULT_ARCH "msvc2017_64")
else()
- set(QT_DEFAULT_ARCH "gcc_64")
+ set(QT_DEFAULT_ARCH "x86_64-linux-gnu")
endif()
--- hifi.orig/cmake/macros/SetupQt.cmake
+++ hifi/cmake/macros/SetupQt.cmake
@@ -27,7 +27,7 @@ function(calculate_qt5_version result _Q
set(_QT_CORE_DIR "${_QT_DIR}/include/QtCore")
endif()
if(NOT EXISTS "${_QT_CORE_DIR}")
- message(FATAL_ERROR "Could not find 'include/QtCore' in '${_QT_DIR}'")
+ message("Could not find 'include/QtCore' in '${_QT_DIR}'")
endif()
set(subdirs "")
get_sub_directories(subdirs ${_QT_CORE_DIR})
@@ -71,13 +71,13 @@ macro(setup_qt)
if (WIN32 OR (ANDROID AND ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")))
set(QT_DEFAULT_ROOT "c:/Qt")
else()
- set(QT_DEFAULT_ROOT "$ENV{HOME}/Qt")
+ set(QT_DEFAULT_ROOT "/usr/lib")
endif()
message("QT_CMAKE_PREFIX_PATH = " ${QT_CMAKE_PREFIX_PATH})
set_from_env(QT_ROOT QT_ROOT ${QT_DEFAULT_ROOT})
set_from_env(QT_ARCH QT_ARCH ${QT_DEFAULT_ARCH})
- # figure out where the qt dir is
- get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
- set(QT_VERSION "unknown")
- calculate_qt5_version(QT_VERSION "${QT_DIR}")
- if (QT_VERSION STREQUAL "unknown")
- message(FATAL_ERROR "Could not determine QT_VERSION")
- endif()
+ # # figure out where the qt dir is
+ # get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
+ # set(QT_VERSION "unknown")
+ # calculate_qt5_version(QT_VERSION "${QT_DIR}")
+ # if (QT_VERSION STREQUAL "unknown")
+ # message(FATAL_ERROR "Could not determine QT_VERSION")
+ # endif()
- set(${_RESULT_NAME} "${QT_ROOT}/${_QT_VERSION}/${QT_ARCH}" PARENT_SCOPE)
+ set(${_RESULT_NAME} "${QT_ROOT}/${QT_ARCH}" PARENT_SCOPE)
endfunction()
# Sets the QT_CMAKE_PREFIX_PATH and QT_DIR variables
@@ -44,7 +44,7 @@ macro(setup_qt)
endif()
if (("QT_CMAKE_PREFIX_PATH" STREQUAL "") OR (NOT EXISTS "${QT_CMAKE_PREFIX_PATH}"))
calculate_default_qt_dir(${QT_VERSION} QT_DIR)
- set(QT_CMAKE_PREFIX_PATH "${QT_DIR}/lib/cmake")
+ set(QT_CMAKE_PREFIX_PATH "${QT_DIR}/cmake")
else()
# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
Index: hifi-interface-84/interface/CMakeLists.txt
if(WIN32)
# windows shell does not like backslashes expanded on the command line,
Index: hifi/interface/CMakeLists.txt
===================================================================
--- hifi-interface-84.orig/interface/CMakeLists.txt
+++ hifi-interface-84/interface/CMakeLists.txt
--- hifi.orig/interface/CMakeLists.txt
+++ hifi/interface/CMakeLists.txt
@@ -35,7 +35,7 @@ else ()
add_custom_command(
OUTPUT ${RESOURCES_RCC}
@ -60,11 +58,11 @@ Index: hifi-interface-84/interface/CMakeLists.txt
+
endif()
if (SCRIPTS_INSTALL_DIR)
Index: hifi-interface-84/tools/nitpick/CMakeLists.txt
if (DEV_BUILD AND (APPLE OR UNIX))
Index: hifi/tools/nitpick/CMakeLists.txt
===================================================================
--- hifi-interface-84.orig/tools/nitpick/CMakeLists.txt
+++ hifi-interface-84/tools/nitpick/CMakeLists.txt
--- hifi.orig/tools/nitpick/CMakeLists.txt
+++ hifi/tools/nitpick/CMakeLists.txt
@@ -12,7 +12,7 @@ generate_qrc(OUTPUT ${RESOURCES_QRC} PAT
add_custom_command(
OUTPUT ${RESOURCES_RCC}

View file

@ -276,7 +276,6 @@ void AssetsBackupHandler::createBackup(const QString& backupName, QuaZip& zip) {
return;
}
_backups.emplace_back(backupName, mappings, false);
qDebug() << "Created asset backup:" << backupName;
}
void AssetsBackupHandler::recoverBackup(const QString& backupName, QuaZip& zip) {

View file

@ -466,31 +466,20 @@ void DomainContentBackupManager::getAllBackupsAndStatus(MiniPromise::Promise pro
void DomainContentBackupManager::removeOldBackupVersions(const BackupRule& rule) {
QDir backupDir { _backupDirectory };
if (backupDir.exists() && rule.maxBackupVersions > 0) {
qCDebug(domain_server) << "Rolling old backup versions for rule" << rule.name;
auto matchingFiles =
backupDir.entryInfoList({ AUTOMATIC_BACKUP_PREFIX + rule.extensionFormat + "*.zip" }, QDir::Files | QDir::NoSymLinks, QDir::Name);
int backupsToDelete = matchingFiles.length() - rule.maxBackupVersions;
if (backupsToDelete <= 0) {
qCDebug(domain_server) << "Found" << matchingFiles.length() << "backups, no backups need to be deleted";
} else {
qCDebug(domain_server) << "Found" << matchingFiles.length() << "backups, deleting " << backupsToDelete << "backup(s)";
if (backupsToDelete > 0) {
for (int i = 0; i < backupsToDelete; ++i) {
auto fileInfo = matchingFiles[i].absoluteFilePath();
QFile backupFile(fileInfo);
if (backupFile.remove()) {
qCDebug(domain_server) << "Removed old backup: " << backupFile.fileName();
} else {
if (!backupFile.remove()) {
qCDebug(domain_server) << "Failed to remove old backup: " << backupFile.fileName();
}
}
qCDebug(domain_server) << "Done removing old backup versions";
}
} else {
qCDebug(domain_server) << "Rolling backups for rule" << rule.name << "."
<< " Max Rolled Backup Versions less than 1 [" << rule.maxBackupVersions << "]."
<< " No need to roll backups";
}
}
@ -501,13 +490,7 @@ void DomainContentBackupManager::backup() {
for (BackupRule& rule : _backupRules) {
auto secondsSinceLastBackup = nowSeconds - rule.lastBackupSeconds;
qCDebug(domain_server) << "Checking [" << rule.name << "] - Time since last backup [" << secondsSinceLastBackup
<< "] "
<< "compared to backup interval [" << rule.intervalSeconds << "]...";
if (secondsSinceLastBackup > rule.intervalSeconds) {
qCDebug(domain_server) << "Time since last backup [" << secondsSinceLastBackup << "] for rule [" << rule.name
<< "] exceeds backup interval [" << rule.intervalSeconds << "] doing backup now...";
bool success;
QString path;
@ -517,13 +500,9 @@ void DomainContentBackupManager::backup() {
continue;
}
qDebug() << "Created backup: " << path;
rule.lastBackupSeconds = nowSeconds;
removeOldBackupVersions(rule);
} else {
qCDebug(domain_server) << "Backup not needed for this rule [" << rule.name << "]...";
}
}
}

View file

@ -322,6 +322,11 @@ DomainServer::DomainServer(int argc, char* argv[]) :
_contentManager->initialize(true);
connect(_contentManager.get(), &DomainContentBackupManager::recoveryCompleted, this, &DomainServer::restart);
static const int NODE_PING_MONITOR_INTERVAL_MSECS = 1 * MSECS_PER_SECOND;
_nodePingMonitorTimer = new QTimer{ this };
connect(_nodePingMonitorTimer, &QTimer::timeout, this, &DomainServer::nodePingMonitor);
_nodePingMonitorTimer->start(NODE_PING_MONITOR_INTERVAL_MSECS);
}
void DomainServer::parseCommandLine(int argc, char* argv[]) {
@ -1722,6 +1727,18 @@ void DomainServer::sendHeartbeatToIceServer() {
}
}
void DomainServer::nodePingMonitor() {
auto nodeList = DependencyManager::get<LimitedNodeList>();
quint64 now = usecTimestampNow();
nodeList->eachNode([now](const SharedNodePointer& node) {
quint64 lastHeard = now - node->getLastHeardMicrostamp();
if (lastHeard > 2 * USECS_PER_SECOND) {
qCDebug(domain_server) << "Haven't heard from " << node->getPublicSocket() << " in " << lastHeard / USECS_PER_MSEC << " msec";
}
});
}
void DomainServer::processOctreeDataPersistMessage(QSharedPointer<ReceivedMessage> message) {
qDebug() << "Received octree data persist message";
auto data = message->readAll();

View file

@ -110,6 +110,7 @@ private slots:
void performIPAddressUpdate(const HifiSockAddr& newPublicSockAddr);
void sendHeartbeatToMetaverse() { sendHeartbeatToMetaverse(QString()); }
void sendHeartbeatToIceServer();
void nodePingMonitor();
void handleConnectedNode(SharedNodePointer newNode, quint64 requestReceiveTime);
void handleTempDomainSuccess(QNetworkReply* requestReply);
@ -257,6 +258,7 @@ private:
QTimer* _iceHeartbeatTimer { nullptr };
QTimer* _metaverseHeartbeatTimer { nullptr };
QTimer* _metaverseGroupCacheTimer { nullptr };
QTimer* _nodePingMonitorTimer { nullptr };
QList<QHostAddress> _iceServerAddresses;
QSet<QHostAddress> _failedIceServerAddresses;

View file

@ -1311,12 +1311,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
accountManager->setAuthURL(NetworkingConstants::METAVERSE_SERVER_URL());
// use our MyAvatar position and quat for address manager path
addressManager->setPositionGetter([this] {
addressManager->setPositionGetter([] {
auto avatarManager = DependencyManager::get<AvatarManager>();
auto myAvatar = avatarManager ? avatarManager->getMyAvatar() : nullptr;
return myAvatar ? myAvatar->getWorldFeetPosition() : Vectors::ZERO;
});
addressManager->setOrientationGetter([this] {
addressManager->setOrientationGetter([] {
auto avatarManager = DependencyManager::get<AvatarManager>();
auto myAvatar = avatarManager ? avatarManager->getMyAvatar() : nullptr;
return myAvatar ? myAvatar->getWorldOrientation() : glm::quat();

2
interface/src/avatar/MyAvatar.h Executable file → Normal file
View file

@ -2603,7 +2603,7 @@ private:
bool _enableDebugDrawIKChains { false };
bool _enableDebugDrawDetailedCollision { false };
mutable bool _cauterizationNeedsUpdate; // do we need to scan children and update their "cauterized" state?
mutable bool _cauterizationNeedsUpdate { false }; // do we need to scan children and update their "cauterized" state?
AudioListenerMode _audioListenerMode;
glm::vec3 _customListenPosition;

View file

@ -136,7 +136,6 @@ void Animation::downloadFinished(const QByteArray& data) {
}
void Animation::animationParseSuccess(HFMModel::Pointer hfmModel) {
qCDebug(animation) << "Animation parse success";
_hfmModel = hfmModel;
finishedLoading(true);
}

View file

@ -230,7 +230,11 @@ void Head::applyEyelidOffset(glm::quat headOrientation) {
const float OPEN_DOWN_MULTIPLIER = 0.3f;
const float BROW_UP_MULTIPLIER = 0.5f;
glm::vec3 lookAt = glm::normalize(getLookAtPosition() - _eyePosition);
glm::vec3 lookAtVector = getLookAtPosition() - _eyePosition;
if (glm::length2(lookAtVector) == 0.0f) {
return;
}
glm::vec3 lookAt = glm::normalize(lookAtVector);
glm::vec3 headUp = headOrientation * Vectors::UNIT_Y;
float eyePitch = (PI / 2.0f) - acos(glm::dot(lookAt, headUp));
float eyelidOffset = glm::clamp(abs(eyePitch * EYE_PITCH_TO_COEFFICIENT), 0.0f, MAX_EYELID_OFFSET);

View file

@ -33,7 +33,7 @@ private:
virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override;
virtual void doRender(RenderArgs* args) override;
GizmoType _gizmoType;
GizmoType _gizmoType { UNSET_GIZMO_TYPE };
RingGizmoPropertyGroup _ringProperties;
PrimitiveMode _prevPrimitiveMode;

View file

@ -41,8 +41,8 @@ private:
quint16 _priority;
QUuid _parentID;
MaterialMappingMode _materialMappingMode;
bool _materialRepeat;
MaterialMappingMode _materialMappingMode { UNSET_MATERIAL_MAPPING_MODE };
bool _materialRepeat { false };
glm::vec2 _materialMappingPos;
glm::vec2 _materialMappingScale;
float _materialMappingRot;

View file

@ -177,6 +177,9 @@ void PolyLineEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer&
void PolyLineEntityRenderer::updateGeometry() {
int maxNumVertices = std::min(_points.length(), _normals.length());
if (maxNumVertices < 1) {
return;
}
bool doesStrokeWidthVary = false;
if (_widths.size() > 0) {
float prevWidth = _widths[0];

View file

@ -51,9 +51,9 @@ protected:
float _textureAspectRatio { 1.0f };
bool _textureLoaded { false };
bool _isUVModeStretch;
bool _faceCamera;
bool _glow;
bool _isUVModeStretch { false };
bool _faceCamera { false };
bool _glow { false };
size_t _numVertices;
gpu::BufferPointer _polylineDataBuffer;

View file

@ -827,7 +827,12 @@ EntityItemID EntityTree::evalRayIntersection(const glm::vec3& origin, const glm:
PickFilter searchFilter, OctreeElementPointer& element, float& distance,
BoxFace& face, glm::vec3& surfaceNormal, QVariantMap& extraInfo,
Octree::lockType lockType, bool* accurateResult) {
RayArgs args = { origin, direction, 1.0f / direction, entityIdsToInclude, entityIdsToDiscard,
// calculate dirReciprocal like this rather than with glm's scalar / vec3 template to avoid NaNs.
vec3 dirReciprocal = glm::vec3(direction.x == 0.0f ? 0.0f : 1.0f / direction.x,
direction.y == 0.0f ? 0.0f : 1.0f / direction.y,
direction.z == 0.0f ? 0.0f : 1.0f / direction.z);
RayArgs args = { origin, direction, dirReciprocal, entityIdsToInclude, entityIdsToDiscard,
searchFilter, element, distance, face, surfaceNormal, extraInfo, EntityItemID() };
distance = FLT_MAX;

View file

@ -385,7 +385,6 @@ FBXNode FBXSerializer::parseFBX(QIODevice* device) {
quint32 fileVersion;
in >> fileVersion;
position += sizeof(fileVersion);
qCDebug(modelformat) << "fileVersion:" << fileVersion;
bool has64BitPositions = (fileVersion >= FBX_VERSION_2016);
// parse the top-level node

View file

@ -128,7 +128,7 @@ namespace image {
QImage _packedData;
FloatPixels _floatData;
glm::ivec2 _dims;
Format _format;
Format _format { Format_Invalid };
};
} // namespace image

View file

@ -96,7 +96,7 @@ private:
friend class KTXReader;
friend class ImageReader;
image::TextureUsage::Type _type;
image::TextureUsage::Type _type { image::TextureUsage::UNUSED_TEXTURE };
image::ColorChannel _sourceChannel;
enum class ResourceType {

View file

@ -43,15 +43,6 @@ static Setting::Handle<quint16> LIMITED_NODELIST_LOCAL_PORT("LimitedNodeList.Loc
using namespace std::chrono_literals;
static const std::chrono::milliseconds CONNECTION_RATE_INTERVAL_MS = 1s;
const std::set<NodeType_t> SOLO_NODE_TYPES = {
NodeType::AvatarMixer,
NodeType::AudioMixer,
NodeType::AssetServer,
NodeType::EntityServer,
NodeType::MessagesMixer,
NodeType::EntityScriptServer
};
LimitedNodeList::LimitedNodeList(int socketListenPort, int dtlsListenPort) :
_nodeSocket(this),
_packetReceiver(new PacketReceiver(this))

View file

@ -53,8 +53,6 @@ const quint64 NODE_SILENCE_THRESHOLD_MSECS = 10 * 1000;
static const size_t DEFAULT_MAX_CONNECTION_RATE { std::numeric_limits<size_t>::max() };
extern const std::set<NodeType_t> SOLO_NODE_TYPES;
const char DEFAULT_ASSIGNMENT_SERVER_HOSTNAME[] = "localhost";
const char STUN_SERVER_HOSTNAME[] = "stun.highfidelity.io";
@ -330,6 +328,15 @@ public:
float getInboundKbps() const { return _inboundKbps; }
float getOutboundKbps() const { return _outboundKbps; }
const std::set<NodeType_t> SOLO_NODE_TYPES = {
NodeType::AvatarMixer,
NodeType::AudioMixer,
NodeType::AssetServer,
NodeType::EntityServer,
NodeType::MessagesMixer,
NodeType::EntityScriptServer
};
public slots:
void reset();
void eraseAllNodes();

View file

@ -673,6 +673,13 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
// refuse to process this packet if we aren't currently connected to the DS
return;
}
#ifdef DEBUG_EVENT_QUEUE
{
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
qCDebug(networking) << "DomainList received, pending count =" << _domainHandler.getCheckInPacketsSinceLastReply()
<< "NodeList thread event queue size =" << nodeListQueueSize;
}
#endif
// warn if ping lag is getting long
if (pingLagTime > qint64(MSECS_PER_SECOND)) {

View file

@ -89,7 +89,7 @@ SequenceNumberStats::ArrivalInfo SequenceNumberStats::sequenceNumberReceived(qui
} else if (absGap > MAX_REASONABLE_SEQUENCE_GAP) {
arrivalInfo._status = Unreasonable;
HIFI_FCDEBUG(networking(), "unreasonable sequence number:" << incoming << "previous:" << _lastReceivedSequence);
qCDebug(networking) << "unreasonable sequence number:" << incoming << "previous:" << _lastReceivedSequence;
_stats._unreasonable++;
@ -153,7 +153,7 @@ SequenceNumberStats::ArrivalInfo SequenceNumberStats::sequenceNumberReceived(qui
arrivalInfo._status = Unreasonable;
HIFI_FCDEBUG(networking(), "unreasonable sequence number:" << incoming << "(possible duplicate)");
qCDebug(networking) << "unreasonable sequence number:" << incoming << "(possible duplicate)";
_stats._unreasonable++;

View file

@ -162,16 +162,16 @@ qint64 Socket::writePacket(std::unique_ptr<Packet> packet, const HifiSockAddr& s
}
qint64 Socket::writePacketList(std::unique_ptr<PacketList> packetList, const HifiSockAddr& sockAddr) {
if (packetList->getNumPackets() == 0) {
qCWarning(networking) << "Trying to send packet list with 0 packets, bailing.";
return 0;
}
if (packetList->isReliable()) {
// hand this packetList off to writeReliablePacketList
// because Qt can't invoke with the unique_ptr we have to release it here and re-construct in writeReliablePacketList
if (packetList->getNumPackets() == 0) {
qCWarning(networking) << "Trying to send packet list with 0 packets, bailing.";
return 0;
}
if (QThread::currentThread() != thread()) {
auto ptr = packetList.release();
QMetaObject::invokeMethod(this, "writeReliablePacketList", Qt::AutoConnection,
@ -189,7 +189,6 @@ qint64 Socket::writePacketList(std::unique_ptr<PacketList> packetList, const Hif
while (!packetList->_packets.empty()) {
totalBytesSent += writePacket(packetList->takeFront<Packet>(), sockAddr);
}
return totalBytesSent;
}
@ -228,7 +227,7 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
if (bytesWritten < 0) {
// when saturating a link this isn't an uncommon message - suppress it so it doesn't bomb the debug
HIFI_FCDEBUG(networking(), "Socket::writeDatagram" << _udpSocket.error());
qCDebug(networking) << "Socket::writeDatagram : " << sockAddr << " " << _udpSocket.error();
}
return bytesWritten;
@ -245,7 +244,7 @@ Connection* Socket::findOrCreateConnection(const HifiSockAddr& sockAddr, bool fi
#ifdef UDT_CONNECTION_DEBUG
qCDebug(networking) << "Socket::findOrCreateConnection refusing to create connection for" << sockAddr
<< "due to connection creation filter";
#endif
#endif // UDT_CONNECTION_DEBUG
return nullptr;
} else {
auto congestionControl = _ccFactory->create();
@ -259,9 +258,7 @@ Connection* Socket::findOrCreateConnection(const HifiSockAddr& sockAddr, bool fi
QObject::connect(connection.get(), &Connection::receiverHandshakeRequestComplete,
this, &Socket::clientHandshakeRequestComplete);
#ifdef UDT_CONNECTION_DEBUG
qCDebug(networking) << "Creating new connection to" << sockAddr;
#endif
it = _connectionsHash.insert(it, std::make_pair(sockAddr, std::move(connection)));
}
@ -334,7 +331,11 @@ void Socket::readPendingDatagrams() {
if (system_clock::now() > abortTime) {
// We've been running for too long, stop processing packets for now
// Once we've processed the event queue, we'll come back to packet processing
qCDebug(networking) << "Socket::readPendingDatagrams() running too long, aborting to process event queue";
#ifdef DEBUG_EVENT_QUEUE
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
qCDebug(networking) << "Overran timebox by" << duration_cast<milliseconds>(system_clock::now() - abortTime).count()
<< "ms; NodeList thread event queue size =" << nodeListQueueSize;
#endif
break;
}
@ -489,7 +490,7 @@ std::vector<HifiSockAddr> Socket::getConnectionSockAddrs() {
}
void Socket::handleSocketError(QAbstractSocket::SocketError socketError) {
HIFI_FCDEBUG(networking(), "udt::Socket error - " << socketError);
qCDebug(networking) << "udt::Socket error - " << socketError;
}
void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {

View file

@ -474,6 +474,10 @@ void AmbientOcclusionEffect::updateBlurParameters() {
}
const auto occlusionSize = frameSize >> resolutionLevel;
if (occlusionSize.x == 0 || occlusionSize.y == 0) {
return;
}
// Occlusion UV limit
hblur._blurAxis.z = occlusionSize.x / float(frameSize.x);
hblur._blurAxis.w = occlusionSize.y / float(frameSize.y);

View file

@ -26,6 +26,8 @@
enum GizmoType {
RING = 0,
// put new gizmo-types before this line.
UNSET_GIZMO_TYPE
};
class GizmoTypeHelpers {

View file

@ -13,7 +13,9 @@
enum MaterialMappingMode {
UV = 0,
PROJECTED
PROJECTED,
// put new mapping-modes before this line.
UNSET_MATERIAL_MAPPING_MODE
};
class MaterialMappingModeHelpers {

View file

@ -42,11 +42,7 @@ function runNewDefaultsTogether() {
}
// Uncomment this out once the work is actually complete.
// Until then, users are required to access some functionality from the top menu bar.
//var MENU_NAMES = ["File", "Edit", "Display", "View", "Navigate", "Settings", "Developer", "Help"];
var MENU_NAMES = ["File", "Edit", "Display", "View", "Navigate", "Help",
"Settings > General...", "Settings > Controls...", "Settings > Audio...", "Settings > Graphics...", "Settings > Security..."];
var MENU_NAMES = ["File", "Edit", "Display", "View", "Navigate", "Settings", "Developer", "Help"];
var keepMenusSetting = Settings.getValue("simplifiedUI/keepMenus", false);
function maybeRemoveDesktopMenu() {
if (!keepMenusSetting) {
@ -535,7 +531,7 @@ function shutdown() {
restoreScripts();
if (!keepExistingUIAndScriptsSetting) {
Window.confirm("You'll have to restart Interface to get full functionality back. Clicking yes or no will dismiss this dialog.");
console.log("The Simplified UI script has been shut down. If you notice any strangeness with user interface, please restart this application.");
if (!HMD.active) {
var toolbar = Toolbars.getToolbar(TOOLBAR_NAME);