mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 14:46:55 +02:00
Merge pull request #15674 from sethalves/quiet-some-warnings
Quiet some warnings
This commit is contained in:
commit
c48ecb5f67
18 changed files with 80 additions and 66 deletions
76
debian/patches/hifi_use_system_qt.diff
vendored
76
debian/patches/hifi_use_system_qt.diff
vendored
|
@ -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}
|
||||
|
|
|
@ -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
2
interface/src/avatar/MyAvatar.h
Executable file → Normal 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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace image {
|
|||
QImage _packedData;
|
||||
FloatPixels _floatData;
|
||||
glm::ivec2 _dims;
|
||||
Format _format;
|
||||
Format _format { Format_Invalid };
|
||||
};
|
||||
|
||||
} // namespace image
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
enum GizmoType {
|
||||
RING = 0,
|
||||
// put new gizmo-types before this line.
|
||||
UNSET_GIZMO_TYPE
|
||||
};
|
||||
|
||||
class GizmoTypeHelpers {
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
enum MaterialMappingMode {
|
||||
UV = 0,
|
||||
PROJECTED
|
||||
PROJECTED,
|
||||
// put new mapping-modes before this line.
|
||||
UNSET_MATERIAL_MAPPING_MODE
|
||||
};
|
||||
|
||||
class MaterialMappingModeHelpers {
|
||||
|
|
Loading…
Reference in a new issue