diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml
index 8d9844e03cf..c4be9234cc4 100644
--- a/.github/workflows/master_build.yml
+++ b/.github/workflows/master_build.yml
@@ -56,7 +56,7 @@ jobs:
echo "PYTHON_EXEC=python3" >> $GITHUB_ENV
echo "INSTALLER_EXT=tgz" >> $GITHUB_ENV
echo "CMAKE_BUILD_EXTRA=-- -j3" >> $GITHUB_ENV
- echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
+ echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
fi
# Mac build variables
if [ "${{ matrix.os }}" = "macOS-10.15" ]; then
@@ -64,7 +64,7 @@ jobs:
echo "ZIP_COMMAND=zip" >> $GITHUB_ENV
echo "ZIP_ARGS=-r" >> $GITHUB_ENV
echo "INSTALLER_EXT=dmg" >> $GITHUB_ENV
- echo "CMAKE_EXTRA=-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
+ echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
echo "::set-output name=symbols_archive::${BUILD_NUMBER}-${{ matrix.build_type }}-mac-symbols.zip"
echo "APP_TARGET_NAME=Vircadia" >> $GITHUB_ENV
fi
diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml
index 9bd3f7fb128..3addace0b76 100644
--- a/.github/workflows/pr_build.yml
+++ b/.github/workflows/pr_build.yml
@@ -75,9 +75,9 @@ jobs:
echo "VCPKG_FORCE_SYSTEM_BINARIES=true" >> $GITHUB_ENV
fi
if [ "${{ matrix.build_type }}" = "full" ]; then
- echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
+ echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
else
- echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
+ echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
fi
fi
# Mac build variables
@@ -85,9 +85,9 @@ jobs:
echo "PYTHON_EXEC=python3" >> $GITHUB_ENV
echo "INSTALLER_EXT=dmg" >> $GITHUB_ENV
if [ "${{ matrix.build_type }}" = "full" ]; then
- echo "CMAKE_EXTRA=-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
+ echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
else
- echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
+ echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
fi
echo "APP_TARGET_NAME=Vircadia" >> $GITHUB_ENV
fi
diff --git a/BUILD.md b/BUILD.md
index 82da773f08e..fd30b124eba 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -192,6 +192,13 @@ The following build options can be used when running CMake
* CLIENT_ONLY // Will package only the Interface
* SERVER_ONLY // Will package only the Server
+### Optimization build options
+
+* VIRCADIA_OPTIMIZE - This variable defaults to 1 if not set and enables compiler optimization flags on Linux and MacOS. Setting it to 0 will result in unoptimized build.
+* VIRCADIA_CPU_ARCHITECTURE - This variable contains architecture specific compiler flags which are used if `VIRCADIA_OPTIMIZE` is true. If it is not set, it defaults to `-march=native -mtune=native`, which helps yield more performance for locally used build, but for packaging it needs to be set to different value for portability, for example `-msse3`. Setting `VIRCADIA_CPU_ARCHITECTURE` to empty string will use default compiler settings and yield
+maximum compatibility.
+
+
### Developer Build Options
* USE_GLES
diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md
index 1996360fed5..ae0a88a98ec 100644
--- a/BUILD_LINUX.md
+++ b/BUILD_LINUX.md
@@ -171,3 +171,11 @@ If your goal is to set up a development environment, it is desirable to set the
directory that vcpkg builds into with the `HIFI_VCPKG_BASE` environment variable.
For example, you might set `HIFI_VCPKG_BASE` to `/home/$USER/vcpkg`.
By default, vcpkg will build in the system `/tmp` directory.
+
+If build is intended for packaging or creation of AppImage, `VIRCADIA_CPU_ARCHITECTURE`
+CMake variable needs to be set to architecture specific value.
+It defaults to `-march=native -mtune=native`, which yields builds optimized for particular
+machine, but builds will not work on machines lacking same CPU instructions.
+For packaging and AppImage it is recommended to set it to different value, for example `-msse3`.
+Setting `VIRCADIA_CPU_ARCHITECTURE` to empty string will use default compiler settings and yield
+maximum compatibility.
diff --git a/BUILD_OSX.md b/BUILD_OSX.md
index d9c7f0ee0ff..03106b93542 100644
--- a/BUILD_OSX.md
+++ b/BUILD_OSX.md
@@ -1,63 +1,84 @@
-# Build OSX
+# Build MacOS
-*Last Updated on January 16, 2021*
+*Last Updated on October 19, 2021*
-Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only macOS specific instructions are found in this document.
+Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. This will include the necessary environment variables to customize your build. Only macOS specific instructions are found in this document.
-## Homebrew
+## Prerequisites
-[Homebrew](https://brew.sh/) is an excellent package manager for macOS. It makes install of some Vircadia dependencies very simple.
+### CMake, OpenSSL, and NPM
+
+[Homebrew](https://brew.sh/) is an excellent package manager for macOS. It makes the installation of some Vircadia dependencies very simple.
```bash
brew install cmake openssl npm
```
-Note: cmake versions > 3.18.x have known problems building Vircadia, so alternatively you can download cmake 3.18.4 (or earlier versions) from [Github](https://github.com/Kitware/CMake/releases).
+**Note:** You can also download alternative CMake versions from [Github](https://github.com/Kitware/CMake/releases) if needed.
-## Python 3
+### Python 3
Download an install Python 3.6.6 or higher from [here](https://www.python.org/downloads/).
Execute the `Update Shell Profile.command` script that is provided with the installer.
-## OSX SDK
+### MacOS SDK
-You will need version `10.12` of the OSX SDK for building, otherwise you may have crashing or other unintended issues due to the deprecation of OpenGL on OSX. You can get that SDK from [here](https://github.com/phracker/MacOSX-SDKs). You must copy it in to your Xcode SDK directory, e.g.
+You will need version `10.12` of the macOS SDK for building, otherwise you may have crashing or other unintended issues due to the deprecation of OpenGL on macOS. You can get that SDK from [here](https://github.com/phracker/MacOSX-SDKs). You must copy it in to your Xcode SDK directory, e.g.
```bash
cp -rp ~/Downloads/MacOSX10.12.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
```
-## OpenSSL
+### OpenSSL
+
+Assuming you've installed OpenSSL using the homebrew instructions above, you'll need to set `OPENSSL_ROOT_DIR` so CMake can find your installations.
+For OpenSSL installed via homebrew, set `OPENSSL_ROOT_DIR` via `export OPENSSL_ROOT_DIR=/usr/local/opt/openssl` or by appending `-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl` to `cmake`.
+
+## Generate and Build
-Assuming you've installed OpenSSL using the homebrew instructions above, you'll need to set OPENSSL_ROOT_DIR so CMake can find your installations.
-For OpenSSL installed via homebrew, set OPENSSL_ROOT_DIR via
- `export OPENSSL_ROOT_DIR=/usr/local/opt/openssl`
- or by appending `-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl` to `cmake`
+You can choose to use either Unix Makefiles or Xcode.
-## Xcode
+### Xcode
You can ask CMake to generate Xcode project files instead of Unix Makefiles using the `-G Xcode` parameter after CMake. You will need to select the Xcode installation in the terminal first if you have not done so already.
```bash
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
-cmake ../ -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 ..
+cmake ../ -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode -DOSX_SDK=10.12 ..
```
-If `cmake` complains about Python 3 being missing, you may need to update your CMake binary with command `brew upgrade cmake`, or by downloading and running the latest CMake installer, depending on how you originally installed CMake.
-
-After running CMake, you will have the make files or Xcode project file necessary to build all of the components. Open the hifi.xcodeproj file, choose ALL_BUILD from the Product > Scheme menu (or target drop down), and click Run.
+After running CMake, you will have the make files or Xcode project file necessary to build all of the components. Open the `vircadia.xcodeproj` file, choose `ALL_BUILD` from the Product > Scheme menu (or target drop down), and click Run.
If the build completes successfully, you will have built targets for all components located in the `build/${target_name}/Debug` directories.
-## make
+### make
+
+Run CMake.
-If you build with make rather than Xcode, you can append `-j4` for assigning more threads. The number indicates the number of threads, e.g. 4.
+```bash
+cmake -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 ..
+```
+
+You can append `-j4` to assign more threads to build with. The number indicates the number of threads, e.g. 4.
To package the installation, you can simply run `make package` afterwards.
+## Notes
+
+If build is intended for packaging or creation of AppImage, `VIRCADIA_CPU_ARCHITECTURE`
+CMake variable needs to be set to architecture specific value.
+It defaults to `-march=native -mtune=native`, which yields builds optimized for particular
+machine, but builds will not work on machines lacking same CPU instructions.
+For packaging and AppImage it is recommended to set it to different value, for example `-msse3`.
+Setting `VIRCADIA_CPU_ARCHITECTURE` to empty string will use default compiler settings and yield
+maximum compatibility.
+
## FAQ
-1. **Problem:** Running the scheme `interface.app` from Xcode causes a crash for Interface related to `libgl`
+1. **Problem:** Running the scheme `interface.app` from Xcode causes a crash for Interface related to `libgl`.
1. **Cause:** The target `gl` generates a binary called `libgl`. A macOS `libGL.framework` item gets loaded instead by Xcode.
- 1. **Solution:** In the Xcode target settings for `libgl`, set the version to 1.0.0
+ 2. **Solution:** In the Xcode target settings for `libgl`, set the version to `1.0.0`.
+2. **Problem:** CMake complains about Python 3 being missing.
+ 1. **Cause:** CMake might be out of date.
+ 2. **Solution:** Try updating your CMake binary with command `brew upgrade cmake`, or by downloading and running a newer CMake installer, depending on how you originally installed CMake. Please keep in mind the recommended CMake versions noted above.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8abcce44890..aaafe2b3fcc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,67 @@ if ((NOT "${RELEASE_TYPE}" STREQUAL "PRODUCTION") AND (NOT "${RELEASE_TYPE}" STR
set(RELEASE_TYPE "DEV")
endif()
+# VIRCADIA_OPTIMIZE
+# Variable determining vircadia optimization. If not set, it defaults to true.
+# It's used to determine build flags for main codebase and for VCPKG dependencies.
+# Should be set to false to get completely unoptimized build for easier line-by-line debugging
+
+if( NOT WIN32 )
+ if(NOT DEFINED VIRCADIA_OPTIMIZE)
+ message("Enabling code optimization for Vircadia and compiled dependencies")
+ set(VIRCADIA_OPTIMIZE true CACHE BOOL "Enable code optimization for Vircadia and compiled dependencies")
+ endif()
+
+ #compiler needs to be detected before building VCPKG dependencies
+ set(CMAKE_PLATFORM_INFO_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+ include(CMakeDetermineCXXCompiler)
+
+ set(VIRCADIA_OPTIMIZE_FLAGS "")
+
+ if(VIRCADIA_OPTIMIZE)
+
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/_env/VIRCADIA_OPTIMIZE.txt" "${VIRCADIA_OPTIMIZE}")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ message("Clang compiler detected, adding -O3 -fPIC -g flags")
+ set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC -g")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ message("GCC compiler detected, adding -O3 -fPIC -ggdb flags")
+ set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC -ggdb")
+ else()
+ message("No predefined optimization flags for compiler ${CMAKE_CXX_COMPILER_ID}")
+ endif()
+ endif()
+ MESSAGE(STATUS "VIRCADIA_OPTIMIZE: ${VIRCADIA_OPTIMIZE}")
+
+ # VIRCADIA_CPU_ARCHITECTURE
+ # Variable determining CPU architecture for which Vircadia will be built.
+ # If defined, it's appended to CXXFLAGS and CFLAGS for both Vircadia and VCPKG dependencies
+
+ #Assume -march=native for compilers that allow it if architecture is not specified
+ if(NOT DEFINED VIRCADIA_CPU_ARCHITECTURE)
+ if(VIRCADIA_OPTIMIZE AND ( (CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU") ) )
+ message("Optimization is enabled, but architecture is not specified. Assuming native build")
+ set(VIRCADIA_CPU_ARCHITECTURE "-march=native -mtune=native" CACHE STRING "Specify architecture dependent compiler flags here")
+ endif()
+ endif()
+
+ if(DEFINED VIRCADIA_CPU_ARCHITECTURE)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt" "${VIRCADIA_CPU_ARCHITECTURE}")
+ set(VIRCADIA_OPTIMIZE_FLAGS "${VIRCADIA_OPTIMIZE_FLAGS} ${VIRCADIA_CPU_ARCHITECTURE}")
+ message("Adding CPU architecture flags: ${VIRCADIA_CPU_ARCHITECTURE}")
+ MESSAGE(STATUS "VIRCADIA_CPU_ARCHITECTURE: ${VIRCADIA_CPU_ARCHITECTURE}")
+ endif()
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VIRCADIA_OPTIMIZE_FLAGS}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIRCADIA_OPTIMIZE_FLAGS}")
+
+ set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} ${VIRCADIA_OPTIMIZE_FLAGS}")
+ set(ENV{CFLAGS} "$ENV{CFLAGS} ${VIRCADIA_OPTIMIZE_FLAGS}")
+ message($ENV{CXXFLAGS})
+endif()
+
+
+
if (HIFI_ANDROID)
execute_process(
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --release-type ${RELEASE_TYPE} --android ${HIFI_ANDROID_APP} --build-root ${CMAKE_BINARY_DIR}
diff --git a/README.md b/README.md
index c1cd8323e96..a0621900929 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,17 @@
-
+
+
+
+
+
+
+
+
Build Status
-
+
+
+
### What is this?
@@ -50,7 +59,7 @@ Vircadia™ is a 3D social software project seeking to incrementally bring about
### Boot to Metaverse: [The Goal](https://vircadia.com/vision/)
-Having a place to experience adventure, a place to relax with calm breath, that's a world to live in. An engine to support infinite combinations and possibilities of worlds without censorship and interruption, that's a metaverse. Finding a way to make infinite realities our reality is the dream.
+Having a place to experience adventure, a place to relax with calm breath, that's a world to live in. An engine to support infinite combinations and possibilities of worlds without censorship and interruption, that's metaverse. Finding a way to make infinite realities our reality is the dream.
### Boot to Metaverse: The Technicals
@@ -64,14 +73,16 @@ Vircadia consists of many projects and codebases with its unifying structure's g
- [The Metaverse Server Dashboard (Codename Iamus)](https://github.com/vircadia/project-iamus-dashboard/)
- [The Launcher (Codename Pantheon)](https://github.com/vircadia/pantheon-launcher/) - Currently Windows only.
-#### Child Projects
+#### Tools
- [Vircadia Builder for Linux](https://github.com/vircadia/vircadia-builder/)
+
+#### Documentation
- [User Documentation](https://github.com/vircadia/vircadia-docs-sphinx/)
- [Developer Documentation](https://github.com/vircadia/vircadia-dev-docs/)
### Contribution
-There are many contributors to Vircadia. Code writers, reviewers, testers, documentation writers, modelers, and general supporters of the project are all integral to its development and success towards its goals. Find out how you can [contribute](CONTRIBUTING.md)!
+There are many contributors to Vircadia. Code writers, reviewers, testers, documentation writers, modelers, and general supporters of the project are all integral to its development and success towards its goals. Find out how you can [contribute](https://vircadia.com/contribute)!
### Support
@@ -83,6 +94,6 @@ Keep in mind that Vircadia consists of multiple smaller projects that might have
#### Supporters of the Vircadia Project
-| [Karol Suprynowicz - 74hc595](https://github.com/ksuprynowicz) |
+| [ksuprynowicz (74hc595)](https://github.com/ksuprynowicz) |
| --- |
-| [](https://github.com/ksuprynowicz)
\ No newline at end of file
+| [](https://github.com/ksuprynowicz)
diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake
index 45cef27727a..51082534031 100644
--- a/cmake/compiler.cmake
+++ b/cmake/compiler.cmake
@@ -110,3 +110,5 @@ if (APPLE)
set(CMAKE_OSX_SYSROOT ${_OSX_DESIRED_SDK_PATH}/MacOSX${OSX_SDK}.sdk)
endif ()
endif ()
+
+message("CXXFLAGS: ${CXXFLAGS}")
diff --git a/cmake/macros/TargetOpenSSL.cmake b/cmake/macros/TargetOpenSSL.cmake
index f74015201db..faf5116a257 100644
--- a/cmake/macros/TargetOpenSSL.cmake
+++ b/cmake/macros/TargetOpenSSL.cmake
@@ -12,7 +12,7 @@ macro(TARGET_OPENSSL)
set(OPENSSL_LIBRARIES "${OPENSSL_INSTALL_DIR}/lib/libcrypto.a;${OPENSSL_INSTALL_DIR}/lib/libssl.a" CACHE STRING INTERNAL)
else()
# using VCPKG for OpenSSL
- find_package(OpenSSL REQUIRED)
+ find_package(OpenSSL 1.1.0 REQUIRED)
endif()
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
diff --git a/cmake/ports/bullet3/portfile.cmake b/cmake/ports/bullet3/portfile.cmake
index cda39ed3496..ab27c8494dc 100644
--- a/cmake/ports/bullet3/portfile.cmake
+++ b/cmake/ports/bullet3/portfile.cmake
@@ -15,6 +15,7 @@
include(vcpkg_common_functions)
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(WARNING "Dynamic not supported, building static")
set(VCPKG_LIBRARY_LINKAGE static)
@@ -30,6 +31,32 @@ vcpkg_from_github(
PATCHES "bullet-git-fix-build-clang-8.patch"
)
+if(WIN32)
+ set(VIRCADIA_BULLET_OPTIONS "")
+else()
+ if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt")
+ file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt" VIRCADIA_OPTIMIZE)
+ endif()
+ if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt")
+ file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt" VIRCADIA_CPU_ARCHITECTURE)
+ endif()
+
+
+ if(VIRCADIA_OPTIMIZE)
+ set(VIRCADIA_BULLET_OPTIONS "-DCMAKE_BUILD_TYPE=Release")
+ else()
+ set(VIRCADIA_BULLET_OPTIONS "-DCMAKE_BUILD_TYPE=RelWithDebInfo")
+ endif()
+
+ set(VIRCADIA_BULLET_OPTIONS "${VIRCADIA_BULLET_OPTIONS}")
+
+ if(DEFINED VIRCADIA_CPU_ARCHITECTURE)
+ set(VIRCADIA_BULLET_OPTIONS "${VIRCADIA_BULLET_OPTIONS} -DCMAKE_CXX_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" -DCMAKE_C_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" ")
+ endif()
+endif()
+
+message("Optimization options for Bullet: ${VIRCADIA_BULLET_OPTIONS}")
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
@@ -46,6 +73,7 @@ vcpkg_configure_cmake(
-DBUILD_UNIT_TESTS=OFF
-DBUILD_SHARED_LIBS=ON
-DINSTALL_LIBS=ON
+ ${VIRCADIA_BULLET_OPTIONS}
)
vcpkg_install_cmake()
@@ -58,4 +86,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics
vcpkg_copy_pdbs()
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright)
\ No newline at end of file
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright)
diff --git a/cmake/ports/opus/portfile.cmake b/cmake/ports/opus/portfile.cmake
index e5518351f8e..988096ad62d 100644
--- a/cmake/ports/opus/portfile.cmake
+++ b/cmake/ports/opus/portfile.cmake
@@ -12,7 +12,37 @@ vcpkg_from_github(
HEAD_REF
master)
-vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA)
+if(WIN32)
+ set(VIRCADIA_OPUS_OPTIONS "")
+else()
+ if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt")
+ file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt" VIRCADIA_OPTIMIZE)
+ endif()
+ if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt")
+ file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt" VIRCADIA_CPU_ARCHITECTURE)
+ endif()
+
+ if(VIRCADIA_OPTIMIZE)
+ set(VIRCADIA_OPUS_OPTIONS "-DCMAKE_BUILD_TYPE=Release")
+ else()
+ set(VIRCADIA_OPUS_OPTIONS "-DCMAKE_BUILD_TYPE=RelWithDebInfo")
+ endif()
+
+ set(VIRCADIA_OPUS_OPTIONS "${VIRCADIA_OPUS_OPTIONS}")
+
+ if(DEFINED VIRCADIA_CPU_ARCHITECTURE)
+ set(VIRCADIA_OPUS_OPTIONS "${VIRCADIA_OPUS_OPTIONS} -DCMAKE_CXX_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" -DCMAKE_C_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" ")
+ endif()
+endif()
+
+message("Optimization options for Opus: ${VIRCADIA_OPUS_OPTIONS}")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS ${VIRCADIA_OPUS_OPTIONS}
+)
+
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Opus)
vcpkg_copy_pdbs()
diff --git a/ice-server/CMakeLists.txt b/ice-server/CMakeLists.txt
index 9234d68faf0..eed795ca396 100644
--- a/ice-server/CMakeLists.txt
+++ b/ice-server/CMakeLists.txt
@@ -8,7 +8,7 @@ link_hifi_libraries(embedded-webserver networking shared)
package_libraries_for_deployment()
# find OpenSSL
-find_package(OpenSSL REQUIRED)
+find_package(OpenSSL 1.1.0 REQUIRED)
if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include")
# this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto
diff --git a/interface/resources/qml/hifi/dialogs/graphics/GraphicsSettings.qml b/interface/resources/qml/hifi/dialogs/graphics/GraphicsSettings.qml
index 6e345caaf7d..241f7017662 100644
--- a/interface/resources/qml/hifi/dialogs/graphics/GraphicsSettings.qml
+++ b/interface/resources/qml/hifi/dialogs/graphics/GraphicsSettings.qml
@@ -52,6 +52,20 @@ Item {
Layout.preferredWidth: parent.width
spacing: 0
+ HifiControlsUit.RadioButton {
+ id: performanceLowPower
+ colorScheme: hifi.colorSchemes.dark
+ height: 18
+ fontSize: 16
+ leftPadding: 0
+ text: "Low Power"
+ checked: Performance.getPerformancePreset() === PerformanceEnums.LOW_POWER
+ onClicked: {
+ Performance.setPerformancePreset(PerformanceEnums.LOW_POWER);
+ root.refreshAllDropdowns();
+ }
+ }
+
HifiControlsUit.RadioButton {
id: performanceLow
colorScheme: hifi.colorSchemes.dark
@@ -358,6 +372,68 @@ Item {
}
}
}
+
+ ColumnLayout {
+ Layout.topMargin: 20
+ Layout.preferredWidth: parent.width
+ spacing: 0
+
+ Item {
+ Layout.preferredWidth: parent.width
+ Layout.preferredHeight: 35
+
+ HifiStylesUit.RalewayRegular {
+ id: antialiasingHeader
+ text: "Anti-aliasing"
+ anchors.left: parent.left
+ anchors.top: parent.top
+ width: 130
+ height: parent.height
+ size: 16
+ color: "#FFFFFF"
+ }
+
+ ListModel {
+ id: antialiasingModel
+
+ // Maintain same order as "AntialiasingConfig::Mode".
+ ListElement {
+ text: "None"
+ }
+ ListElement {
+ text: "TAA"
+ }
+ ListElement {
+ text: "FXAA"
+ }
+ }
+
+ HifiControlsUit.ComboBox {
+ id: antialiasingDropdown
+ anchors.left: antialiasingHeader.right
+ anchors.leftMargin: 20
+ anchors.top: parent.top
+ width: 280
+ height: parent.height
+ colorScheme: hifi.colorSchemes.dark
+ model: antialiasingModel
+ currentIndex: -1
+
+ function refreshAntialiasingDropdown() {
+ antialiasingDropdown.currentIndex = Render.antialiasingMode;
+ }
+
+ Component.onCompleted: {
+ antialiasingDropdown.refreshAntialiasingDropdown();
+ }
+
+ onCurrentIndexChanged: {
+ Render.antialiasingMode = currentIndex;
+ antialiasingDropdown.displayText = model.get(currentIndex).text;
+ }
+ }
+ }
+ }
}
}
@@ -365,5 +441,6 @@ Item {
worldDetailDropdown.refreshWorldDetailDropdown();
renderingEffectsDropdown.refreshRenderingEffectsDropdownDisplay();
refreshRateDropdown.refreshRefreshRateDropdownDisplay();
+ antialiasingDropdown.refreshAntialiasingDropdown();
}
}
diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml
index 6a59816af82..2c17ecf6c38 100644
--- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml
+++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml
@@ -174,6 +174,15 @@ Flickable {
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
spacing: simplifiedUI.margins.settings.spacingBetweenRadiobuttons
+ SimplifiedControls.RadioButton {
+ id: performanceLow
+ text: "Low Power Quality" + (PlatformInfo.getTierProfiled() === PerformanceEnums.LOW_POWER ? " (Recommended)" : "")
+ checked: Performance.getPerformancePreset() === PerformanceEnums.LOW_POWER
+ onClicked: {
+ Performance.setPerformancePreset(PerformanceEnums.LOW_POWER);
+ }
+ }
+
SimplifiedControls.RadioButton {
id: performanceLow
text: "Low Quality" + (PlatformInfo.getTierProfiled() === PerformanceEnums.LOW ? " (Recommended)" : "")
diff --git a/interface/src/CrashHandler_Crashpad.cpp b/interface/src/CrashHandler_Crashpad.cpp
index 8c8ceed4b3f..50f384b0d63 100644
--- a/interface/src/CrashHandler_Crashpad.cpp
+++ b/interface/src/CrashHandler_Crashpad.cpp
@@ -386,6 +386,8 @@ bool startCrashHandler(std::string appPath) {
} else {
qCDebug(crash_handler) << "Locating own directory by argv[0]";
interfaceDir.setPath(QString::fromStdString(appPath));
+ // argv[0] gets us the path including the binary file
+ interfaceDir.cdUp();
}
if (!interfaceDir.exists(CRASHPAD_HANDLER_NAME)) {
diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp
index 760a7b11274..72504c5571f 100644
--- a/interface/src/Menu.cpp
+++ b/interface/src/Menu.cpp
@@ -405,9 +405,6 @@ Menu::Menu() {
// Developer > Render >>>
MenuWrapper* renderOptionsMenu = developerMenu->addMenu("Render");
- addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::AntiAliasing, 0, RenderScriptingInterface::getInstance()->getAntialiasingEnabled(),
- RenderScriptingInterface::getInstance(), SLOT(setAntialiasingEnabled(bool)));
-
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::Shadows, 0, RenderScriptingInterface::getInstance()->getShadowsEnabled(),
RenderScriptingInterface::getInstance(), SLOT(setShadowsEnabled(bool)));
diff --git a/interface/src/Menu.h b/interface/src/Menu.h
index 5cd4c2112ef..c42345894ca 100644
--- a/interface/src/Menu.h
+++ b/interface/src/Menu.h
@@ -224,7 +224,6 @@ namespace MenuOption {
const QString DesktopTabletToToolbar = "Desktop Tablet Becomes Toolbar";
const QString HMDTabletToToolbar = "HMD Tablet Becomes Toolbar";
const QString Shadows = "Shadows";
- const QString AntiAliasing = "Temporal Antialiasing (FXAA if disabled)";
const QString AmbientOcclusion = "Ambient Occlusion";
const QString NotificationSounds = "play_notification_sounds";
const QString NotificationSoundsSnapshot = "play_notification_sounds_snapshot";
diff --git a/interface/src/PerformanceManager.cpp b/interface/src/PerformanceManager.cpp
index 47e4f0612b3..190071724a6 100644
--- a/interface/src/PerformanceManager.cpp
+++ b/interface/src/PerformanceManager.cpp
@@ -29,10 +29,11 @@ void PerformanceManager::setupPerformancePresetSettings(bool evaluatePlatformTie
// Here is the mapping between platformTier and performance profile
const std::array platformToPerformancePresetMap = { {
- PerformanceManager::PerformancePreset::MID, // platform::Profiler::UNKNOWN
- PerformanceManager::PerformancePreset::LOW, // platform::Profiler::LOW
- PerformanceManager::PerformancePreset::MID, // platform::Profiler::MID
- PerformanceManager::PerformancePreset::HIGH // platform::Profiler::HIGH
+ PerformanceManager::PerformancePreset::MID, // platform::Profiler::UNKNOWN
+ PerformanceManager::PerformancePreset::LOW_POWER, // platform::Profiler::LOW_POWER
+ PerformanceManager::PerformancePreset::LOW, // platform::Profiler::LOW
+ PerformanceManager::PerformancePreset::MID, // platform::Profiler::MID
+ PerformanceManager::PerformancePreset::HIGH // platform::Profiler::HIGH
} };
// What is our profile?
@@ -69,15 +70,15 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
bool isDeferredCapable = platform::Profiler::isRenderMethodDeferredCapable();
auto masterDisplay = platform::getDisplay(platform::getMasterDisplay());
- // eval recommanded PPI and Scale
- float recommandedPpiScale = 1.0f;
- const float RECOMMANDED_PPI[] = { 200.0f, 120.f, 160.f, 250.f};
+ // eval recommended PPI and Scale
+ float recommendedPpiScale = 1.0f;
+ const float RECOMMENDED_PPI[] = { 200.0f, 200.0f, 120.f, 160.f, 250.f};
if (!masterDisplay.empty() && masterDisplay.count(platform::keys::display::ppi)) {
float ppi = masterDisplay[platform::keys::display::ppi];
// only scale if the actual ppi is higher than the recommended ppi
- if (ppi > RECOMMANDED_PPI[preset]) {
+ if (ppi > RECOMMENDED_PPI[preset]) {
// make sure the scale is no less than a quarter
- recommandedPpiScale = std::max(0.25f, RECOMMANDED_PPI[preset] / (float) ppi);
+ recommendedPpiScale = std::max(0.25f, RECOMMENDED_PPI[preset] / (float) ppi);
}
}
@@ -87,39 +88,50 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
RenderScriptingInterface::RenderMethod::DEFERRED :
RenderScriptingInterface::RenderMethod::FORWARD ) );
- RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommandedPpiScale);
+ RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommendedPpiScale);
RenderScriptingInterface::getInstance()->setShadowsEnabled(true);
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::REALTIME);
DependencyManager::get()->setWorldDetailQuality(WORLD_DETAIL_HIGH);
- break;
+ break;
case PerformancePreset::MID:
RenderScriptingInterface::getInstance()->setRenderMethod((isDeferredCapable ?
RenderScriptingInterface::RenderMethod::DEFERRED :
RenderScriptingInterface::RenderMethod::FORWARD));
- RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommandedPpiScale);
+ RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommendedPpiScale);
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
- qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::INTERACTIVE);
+ qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::REALTIME);
DependencyManager::get()->setWorldDetailQuality(WORLD_DETAIL_MEDIUM);
- break;
+ break;
case PerformancePreset::LOW:
+ RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::FORWARD);
+ RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
+ qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::REALTIME);
+
+ RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommendedPpiScale);
+
+ DependencyManager::get()->setWorldDetailQuality(WORLD_DETAIL_LOW);
+
+ break;
+ case PerformancePreset::LOW_POWER:
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::FORWARD);
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::ECO);
- RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommandedPpiScale);
+ RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommendedPpiScale);
DependencyManager::get()->setWorldDetailQuality(WORLD_DETAIL_LOW);
- break;
+ break;
case PerformancePreset::UNKNOWN:
+ // Intentionally unbroken.
default:
- // Do nothing anymore
+ // Do nothing.
break;
}
}
diff --git a/interface/src/PerformanceManager.h b/interface/src/PerformanceManager.h
index f28d56d6ff8..c1e451f54b6 100644
--- a/interface/src/PerformanceManager.h
+++ b/interface/src/PerformanceManager.h
@@ -21,6 +21,7 @@ class PerformanceManager {
public:
enum PerformancePreset {
UNKNOWN = 0, // Matching the platform Tier profiles enumeration for coherence
+ LOW_POWER,
LOW,
MID,
HIGH,
diff --git a/interface/src/scripting/PerformanceScriptingInterface.cpp b/interface/src/scripting/PerformanceScriptingInterface.cpp
index 33ad9a3f95b..ec56e833238 100644
--- a/interface/src/scripting/PerformanceScriptingInterface.cpp
+++ b/interface/src/scripting/PerformanceScriptingInterface.cpp
@@ -29,7 +29,7 @@ PerformanceScriptingInterface::PerformancePreset PerformanceScriptingInterface::
}
QStringList PerformanceScriptingInterface::getPerformancePresetNames() const {
- static const QStringList performancePresetNames = { "UNKNOWN", "LOW", "MID", "HIGH" };
+ static const QStringList performancePresetNames = { "UNKNOWN", "LOW_POWER", "LOW", "MID", "HIGH" };
return performancePresetNames;
}
diff --git a/interface/src/scripting/PerformanceScriptingInterface.h b/interface/src/scripting/PerformanceScriptingInterface.h
index d5048115c77..76e58f29b6b 100644
--- a/interface/src/scripting/PerformanceScriptingInterface.h
+++ b/interface/src/scripting/PerformanceScriptingInterface.h
@@ -57,6 +57,7 @@ class PerformanceScriptingInterface : public QObject {
// PerformanceManager PerformancePreset tri state level enums
enum PerformancePreset {
UNKNOWN = PerformanceManager::PerformancePreset::UNKNOWN,
+ LOW_POWER = PerformanceManager::PerformancePreset::LOW_POWER,
LOW = PerformanceManager::PerformancePreset::LOW,
MID = PerformanceManager::PerformancePreset::MID,
HIGH = PerformanceManager::PerformancePreset::HIGH,
diff --git a/interface/src/scripting/RenderScriptingInterface.cpp b/interface/src/scripting/RenderScriptingInterface.cpp
index 56e9a933772..5ecb1a6e43a 100644
--- a/interface/src/scripting/RenderScriptingInterface.cpp
+++ b/interface/src/scripting/RenderScriptingInterface.cpp
@@ -8,7 +8,6 @@
#include "RenderScriptingInterface.h"
#include "LightingModel.h"
-#include "AntialiasingEffect.h"
RenderScriptingInterface* RenderScriptingInterface::getInstance() {
@@ -29,13 +28,14 @@ void RenderScriptingInterface::loadSettings() {
_renderMethod = (_renderMethodSetting.get());
_shadowsEnabled = (_shadowsEnabledSetting.get());
_ambientOcclusionEnabled = (_ambientOcclusionEnabledSetting.get());
- _antialiasingEnabled = (_antialiasingEnabledSetting.get());
+ //_antialiasingMode = (_antialiasingModeSetting.get());
+ _antialiasingMode = static_cast(_antialiasingModeSetting.get());
_viewportResolutionScale = (_viewportResolutionScaleSetting.get());
});
forceRenderMethod((RenderMethod)_renderMethod);
forceShadowsEnabled(_shadowsEnabled);
forceAmbientOcclusionEnabled(_ambientOcclusionEnabled);
- forceAntialiasingEnabled(_antialiasingEnabled);
+ forceAntialiasingMode(_antialiasingMode);
forceViewportResolutionScale(_viewportResolutionScale);
}
@@ -121,35 +121,50 @@ void RenderScriptingInterface::forceAmbientOcclusionEnabled(bool enabled) {
});
}
-bool RenderScriptingInterface::getAntialiasingEnabled() const {
- return _antialiasingEnabled;
+AntialiasingConfig::Mode RenderScriptingInterface::getAntialiasingMode() const {
+ return _antialiasingMode;
}
-void RenderScriptingInterface::setAntialiasingEnabled(bool enabled) {
- if (_antialiasingEnabled != enabled) {
- forceAntialiasingEnabled(enabled);
+void RenderScriptingInterface::setAntialiasingMode(AntialiasingConfig::Mode mode) {
+ if (_antialiasingMode != mode) {
+ forceAntialiasingMode(mode);
emit settingsChanged();
}
}
-void RenderScriptingInterface::forceAntialiasingEnabled(bool enabled) {
+void RenderScriptingInterface::forceAntialiasingMode(AntialiasingConfig::Mode mode) {
_renderSettingLock.withWriteLock([&] {
- _antialiasingEnabled = (enabled);
- _antialiasingEnabledSetting.set(enabled);
+ _antialiasingMode = mode;
auto mainViewJitterCamConfig = qApp->getRenderEngine()->getConfiguration()->getConfig("RenderMainView.JitterCam");
auto mainViewAntialiasingConfig = qApp->getRenderEngine()->getConfiguration()->getConfig("RenderMainView.Antialiasing");
if (mainViewJitterCamConfig && mainViewAntialiasingConfig) {
- Menu::getInstance()->setIsOptionChecked(MenuOption::AntiAliasing, enabled);
- if (enabled) {
- mainViewJitterCamConfig->play();
- mainViewAntialiasingConfig->setDebugFXAA(false);
- }
- else {
- mainViewJitterCamConfig->none();
- mainViewAntialiasingConfig->setDebugFXAA(true);
+ switch (mode) {
+ case AntialiasingConfig::Mode::NONE:
+ mainViewJitterCamConfig->none();
+ mainViewAntialiasingConfig->blend = 1;
+ mainViewAntialiasingConfig->setDebugFXAA(false);
+ break;
+ case AntialiasingConfig::Mode::TAA:
+ mainViewJitterCamConfig->play();
+ mainViewAntialiasingConfig->blend = 0.25;
+ mainViewAntialiasingConfig->setDebugFXAA(false);
+ break;
+ case AntialiasingConfig::Mode::FXAA:
+ mainViewJitterCamConfig->none();
+ mainViewAntialiasingConfig->blend = 0.25;
+ mainViewAntialiasingConfig->setDebugFXAA(true);
+ break;
+ default:
+ _antialiasingMode = AntialiasingConfig::Mode::NONE;
+ mainViewJitterCamConfig->none();
+ mainViewAntialiasingConfig->blend = 1;
+ mainViewAntialiasingConfig->setDebugFXAA(false);
+ break;
}
}
+
+ _antialiasingModeSetting.set(_antialiasingMode);
});
}
diff --git a/interface/src/scripting/RenderScriptingInterface.h b/interface/src/scripting/RenderScriptingInterface.h
index 97b736259bd..88262b14c11 100644
--- a/interface/src/scripting/RenderScriptingInterface.h
+++ b/interface/src/scripting/RenderScriptingInterface.h
@@ -13,6 +13,8 @@
#include "Application.h"
#include "RenderForward.h"
+#include "AntialiasingEffect.h"
+
/*@jsdoc
* The Render
API enables you to configure the graphics engine.
@@ -27,7 +29,7 @@
* @property {boolean} shadowsEnabled - true
if shadows are enabled, false
if they're disabled.
* @property {boolean} ambientOcclusionEnabled - true
if ambient occlusion is enabled, false
if it's
* disabled.
- * @property {boolean} antialiasingEnabled - true
if anti-aliasing is enabled, false
if it's disabled.
+ * @property {integer} antialiasingMode - The active anti-aliasing mode.
* @property {number} viewportResolutionScale - The view port resolution scale, > 0.0
.
*/
class RenderScriptingInterface : public QObject {
@@ -35,7 +37,7 @@ class RenderScriptingInterface : public QObject {
Q_PROPERTY(RenderMethod renderMethod READ getRenderMethod WRITE setRenderMethod NOTIFY settingsChanged)
Q_PROPERTY(bool shadowsEnabled READ getShadowsEnabled WRITE setShadowsEnabled NOTIFY settingsChanged)
Q_PROPERTY(bool ambientOcclusionEnabled READ getAmbientOcclusionEnabled WRITE setAmbientOcclusionEnabled NOTIFY settingsChanged)
- Q_PROPERTY(bool antialiasingEnabled READ getAntialiasingEnabled WRITE setAntialiasingEnabled NOTIFY settingsChanged)
+ Q_PROPERTY(AntialiasingConfig::Mode antialiasingMode READ getAntialiasingMode WRITE setAntialiasingMode NOTIFY settingsChanged)
Q_PROPERTY(float viewportResolutionScale READ getViewportResolutionScale WRITE setViewportResolutionScale NOTIFY settingsChanged)
public:
@@ -143,18 +145,18 @@ public slots:
void setAmbientOcclusionEnabled(bool enabled);
/*@jsdoc
- * Gets whether or not anti-aliasing is enabled.
- * @function Render.getAntialiasingEnabled
- * @returns {boolean} true
if anti-aliasing is enabled, false
if it's disabled.
+ * Gets the active anti-aliasing mode.
+ * @function Render.getAntialiasingMode
+ * @returns {integer} the active anti-aliasing mode.
*/
- bool getAntialiasingEnabled() const;
+ AntialiasingConfig::Mode getAntialiasingMode() const;
/*@jsdoc
- * Sets whether or not anti-aliasing is enabled.
- * @function Render.setAntialiasingEnabled
- * @param {boolean} enabled - true
to enable anti-aliasing, false
to disable.
+ * Sets the active anti-aliasing mode.
+ * @function Render.setAntialiasingMode
+ * @param {integer} the active anti-aliasing mode.
*/
- void setAntialiasingEnabled(bool enabled);
+ void setAntialiasingMode(AntialiasingConfig::Mode mode);
/*@jsdoc
* Gets the view port resolution scale.
@@ -192,21 +194,22 @@ public slots:
int _renderMethod{ RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED };
bool _shadowsEnabled{ true };
bool _ambientOcclusionEnabled{ false };
- bool _antialiasingEnabled{ true };
+ AntialiasingConfig::Mode _antialiasingMode{ AntialiasingConfig::Mode::TAA };
float _viewportResolutionScale{ 1.0f };
// Actual settings saved on disk
Setting::Handle _renderMethodSetting { "renderMethod", RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED };
Setting::Handle _shadowsEnabledSetting { "shadowsEnabled", true };
Setting::Handle _ambientOcclusionEnabledSetting { "ambientOcclusionEnabled", false };
- Setting::Handle _antialiasingEnabledSetting { "antialiasingEnabled", true };
+ //Setting::Handle _antialiasingModeSetting { "antialiasingMode", AntialiasingConfig::Mode::TAA };
+ Setting::Handle _antialiasingModeSetting { "antialiasingMode", AntialiasingConfig::Mode::TAA };
Setting::Handle _viewportResolutionScaleSetting { "viewportResolutionScale", 1.0f };
// Force assign both setting AND runtime value to the parameter value
void forceRenderMethod(RenderMethod renderMethod);
void forceShadowsEnabled(bool enabled);
void forceAmbientOcclusionEnabled(bool enabled);
- void forceAntialiasingEnabled(bool enabled);
+ void forceAntialiasingMode(AntialiasingConfig::Mode mode);
void forceViewportResolutionScale(float scale);
static std::once_flag registry_flag;
diff --git a/launchers/qt/CMakeLists.txt b/launchers/qt/CMakeLists.txt
index 400615be90a..a472c670bb9 100644
--- a/launchers/qt/CMakeLists.txt
+++ b/launchers/qt/CMakeLists.txt
@@ -69,7 +69,7 @@ if (WIN32)
set(OPENSSL_ROOT_DIR ${SSL_DIR})
message("SSL dir is ${SSL_DIR}")
set(OPENSSL_USE_STATIC_LIBS TRUE)
- find_package(OpenSSL REQUIRED)
+ find_package(OpenSSL 1.1.0 REQUIRED)
message("-- Found OpenSSL Libs ${OPENSSL_LIBRARIES}")
@@ -105,7 +105,7 @@ endif()
if (APPLE)
set(OPENSSL_USE_STATIC_LIBS TRUE)
- find_package(OpenSSL REQUIRED)
+ find_package(OpenSSL 1.1.0 REQUIRED)
endif()
find_package(Qt5 COMPONENTS Core Gui Qml Quick QuickControls2 Network REQUIRED)
diff --git a/libraries/embedded-webserver/src/HTTPConnection.cpp b/libraries/embedded-webserver/src/HTTPConnection.cpp
index f5f0fe02896..a386fc7535b 100644
--- a/libraries/embedded-webserver/src/HTTPConnection.cpp
+++ b/libraries/embedded-webserver/src/HTTPConnection.cpp
@@ -338,6 +338,7 @@ void HTTPConnection::readHeaders() {
QByteArray clength = requestHeader("Content-Length");
if (clength.isEmpty()) {
+ _requestContent = MemoryStorage::make(0);
_parentManager->handleHTTPRequest(this, _requestUrl);
} else {
diff --git a/libraries/embedded-webserver/src/HTTPManager.cpp b/libraries/embedded-webserver/src/HTTPManager.cpp
index ccebeaf9cce..c89c46bd822 100644
--- a/libraries/embedded-webserver/src/HTTPManager.cpp
+++ b/libraries/embedded-webserver/src/HTTPManager.cpp
@@ -31,7 +31,7 @@ HTTPManager::HTTPManager(const QHostAddress& listenAddress, quint16 port, const
_port(port)
{
bindSocket();
-
+
_isListeningTimer = new QTimer(this);
connect(_isListeningTimer, &QTimer::timeout, this, &HTTPManager::isTcpServerListening);
_isListeningTimer->start(SOCKET_CHECK_INTERVAL_IN_MS);
@@ -39,7 +39,7 @@ HTTPManager::HTTPManager(const QHostAddress& listenAddress, quint16 port, const
void HTTPManager::incomingConnection(qintptr socketDescriptor) {
QTcpSocket* socket = new QTcpSocket(this);
-
+
if (socket->setSocketDescriptor(socketDescriptor)) {
new HTTPConnection(socket, this);
} else {
@@ -60,7 +60,7 @@ bool HTTPManager::handleHTTPRequest(HTTPConnection* connection, const QUrl& url,
// so we don't need to attempt to do so in the document root
return true;
}
-
+
if (!_documentRoot.isEmpty()) {
// check to see if there is a file to serve from the document root for this path
QString subPath = url.path();
@@ -88,22 +88,22 @@ bool HTTPManager::handleHTTPRequest(HTTPConnection* connection, const QUrl& url,
// this could be a directory with a trailing slash
// send a redirect to the path with a slash so we can
QString redirectLocation = '/' + subPath + '/';
-
+
if (!url.query().isEmpty()) {
redirectLocation += "?" + url.query();
}
-
+
QHash redirectHeader;
redirectHeader.insert(QByteArray("Location"), redirectLocation.toUtf8());
-
+
connection->respond(HTTPConnection::StatusCode302, "", HTTPConnection::DefaultContentType, redirectHeader);
return true;
}
-
+
// if the last thing is a trailing slash then we want to look for index file
if (subPath.endsWith('/') || subPath.size() == 0) {
QStringList possibleIndexFiles = QStringList() << "index.html" << "index.shtml";
-
+
foreach (const QString& possibleIndexFilename, possibleIndexFiles) {
if (QFileInfo(absoluteFilePath + possibleIndexFilename).exists()) {
filePath = absoluteFilePath + possibleIndexFilename;
@@ -111,64 +111,65 @@ bool HTTPManager::handleHTTPRequest(HTTPConnection* connection, const QUrl& url,
}
}
}
-
+
if (!filePath.isEmpty()) {
// file exists, serve it
static QMimeDatabase mimeDatabase;
-
+
auto localFile = std::unique_ptr(new QFile(filePath));
localFile->open(QIODevice::ReadOnly);
QByteArray localFileData;
-
+
QFileInfo localFileInfo(filePath);
-
+
if (localFileInfo.completeSuffix() == "shtml") {
localFileData = localFile->readAll();
// this is a file that may have some SSI statements
// the only thing we support is the include directive, but check the contents for that
-
+
// setup our static QRegExp that will catch and directives
const QString includeRegExpString = "";
QRegExp includeRegExp(includeRegExpString);
-
+
int matchPosition = 0;
-
+
QString localFileString(localFileData);
-
+
while ((matchPosition = includeRegExp.indexIn(localFileString, matchPosition)) != -1) {
// check if this is a file or vitual include
bool isFileInclude = includeRegExp.cap(1) == "file";
-
+
// setup the correct file path for the included file
QString includeFilePath = isFileInclude
? localFileInfo.canonicalPath() + "/" + includeRegExp.cap(2)
: _documentRoot + includeRegExp.cap(2);
-
+
QString replacementString;
-
+
if (QFileInfo(includeFilePath).isFile()) {
-
+
QFile includedFile(includeFilePath);
includedFile.open(QIODevice::ReadOnly);
-
+
replacementString = QString(includedFile.readAll());
} else {
qCDebug(embeddedwebserver) << "SSI include directive referenced a missing file:" << includeFilePath;
}
-
+
// replace the match with the contents of the file, or an empty string if the file was not found
localFileString.replace(matchPosition, includeRegExp.matchedLength(), replacementString);
-
+
// push the match position forward so we can check the next match
matchPosition += includeRegExp.matchedLength();
}
-
+
localFileData = localFileString.toLocal8Bit();
}
- // if this is an shtml file just make the MIME type match HTML so browsers aren't confused
+ // if this is an shtml, html or htm file just make the MIME type match HTML so browsers aren't confused
// otherwise use the mimeDatabase to look it up
- auto mimeType = localFileInfo.suffix() == "shtml"
+ auto suffix = localFileInfo.suffix();
+ auto mimeType = (suffix == "shtml" || suffix == "html" || suffix == "htm")
? QString { "text/html" }
: mimeDatabase.mimeTypeForFile(filePath).name();
@@ -181,10 +182,10 @@ bool HTTPManager::handleHTTPRequest(HTTPConnection* connection, const QUrl& url,
return true;
}
}
-
+
// respond with a 404
connection->respond(HTTPConnection::StatusCode404, "Resource not found.");
-
+
return true;
}
@@ -201,10 +202,10 @@ void HTTPManager::isTcpServerListening() {
bool HTTPManager::bindSocket() {
qCDebug(embeddedwebserver) << "Attempting to bind TCP socket on port " << QString::number(_port);
-
+
if (listen(_listenAddress, _port)) {
qCDebug(embeddedwebserver) << "TCP socket is listening on" << serverAddress() << "and port" << serverPort();
-
+
return true;
} else {
QString errorMessage = "Failed to open HTTP server socket: " + errorString() + ", can't continue";
diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp
index dd307275233..b9070213991 100644
--- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp
+++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp
@@ -151,13 +151,21 @@ void GLBackend::init() {
GPUIdent* gpu = GPUIdent::getInstance(vendor, renderer);
unsigned int mem;
+// Do not try to get texture memory information on unsupported systems.
+#if defined(Q_OS_ANDROID) || defined(USE_GLES) || defined(Q_OS_DARWIN)
+ qCDebug(gpugllogging) << "Automatic texture memory not supported in this configuration";
+ _videoCard = Unknown;
+ _dedicatedMemory = gpu->getMemory() * BYTES_PER_MIB;
+ _totalMemory = _dedicatedMemory;
+#endif
+
+#if !defined(Q_OS_ANDROID) && !defined(USE_GLES) && !defined(Q_OS_DARWIN)
if (vendor.contains("NVIDIA") ) {
qCDebug(gpugllogging) << "NVIDIA card detected";
-#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
+
GL_GET_INTEGER(GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX);
GL_GET_INTEGER(GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX);
GL_GET_INTEGER(GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX);
-#endif
qCDebug(gpugllogging) << "GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX: " << GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX;
qCDebug(gpugllogging) << "GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX: " << GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX;
@@ -170,10 +178,10 @@ void GLBackend::init() {
} else if (vendor.contains("ATI")) {
qCDebug(gpugllogging) << "ATI card detected";
-#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
+
GL_GET_INTEGER(TEXTURE_FREE_MEMORY_ATI);
-#endif
+ // We are actually getting free memory instead of total memory
_totalMemory = TEXTURE_FREE_MEMORY_ATI * BYTES_PER_KIB;
_dedicatedMemory = _totalMemory;
_videoCard = ATI;
@@ -187,9 +195,10 @@ void GLBackend::init() {
} else {
qCCritical(gpugllogging) << "Don't know how to get memory for OpenGL vendor " << vendor << "; renderer " << renderer << ", trying fallback";
_videoCard = Unknown;
- _dedicatedMemory = gpu->getMemory();
+ _dedicatedMemory = gpu->getMemory() * BYTES_PER_MIB;
_totalMemory = _dedicatedMemory;
}
+#endif
qCDebug(gpugllogging) << "dedicated: " << _dedicatedMemory;
qCDebug(gpugllogging) << "total: " << _totalMemory;
diff --git a/libraries/networking/src/webrtc/WebRTCSignalingServer.cpp b/libraries/networking/src/webrtc/WebRTCSignalingServer.cpp
index 2c557ceaee3..0534639419b 100644
--- a/libraries/networking/src/webrtc/WebRTCSignalingServer.cpp
+++ b/libraries/networking/src/webrtc/WebRTCSignalingServer.cpp
@@ -132,7 +132,6 @@ void WebRTCSignalingServer::webSocketDisconnected() {
if (source) {
auto address = source->peerAddress().toString() + ":" + QString::number(source->peerPort());
_webSockets.remove(address);
- source->abort();
source->deleteLater();
}
}
diff --git a/libraries/platform/src/platform/Profiler.cpp b/libraries/platform/src/platform/Profiler.cpp
index d805fd8ebcc..f64cc66059d 100644
--- a/libraries/platform/src/platform/Profiler.cpp
+++ b/libraries/platform/src/platform/Profiler.cpp
@@ -16,7 +16,7 @@
using namespace platform;
-const std::array Profiler::TierNames = {{ "UNKNOWN", "LOW", "MID", "HIGH" }};
+const std::array Profiler::TierNames = {{ "UNKNOWN", "LOW_POWER", "LOW", "MID", "HIGH" }};
bool filterOnComputer(const platform::json& computer, Profiler::Tier& tier);
diff --git a/libraries/platform/src/platform/Profiler.h b/libraries/platform/src/platform/Profiler.h
index c47f2587f26..eb8a7c4d11c 100644
--- a/libraries/platform/src/platform/Profiler.h
+++ b/libraries/platform/src/platform/Profiler.h
@@ -19,6 +19,7 @@ class Profiler {
public:
enum Tier {
UNKNOWN = 0,
+ LOW_POWER,
LOW,
MID,
HIGH,
diff --git a/libraries/render-utils/src/AntialiasingEffect.cpp b/libraries/render-utils/src/AntialiasingEffect.cpp
index c9da8373db8..9083aa0c2e9 100644
--- a/libraries/render-utils/src/AntialiasingEffect.cpp
+++ b/libraries/render-utils/src/AntialiasingEffect.cpp
@@ -140,7 +140,7 @@ void Antialiasing::run(const render::RenderContextPointer& renderContext, const
#else
void AntialiasingConfig::setAAMode(int mode) {
- _mode = std::min((int)AntialiasingConfig::MODE_COUNT, std::max(0, mode));
+ _mode = std::min((int)AntialiasingConfig::MODE_COUNT, std::max(0, mode)); // Just use unsigned?
emit dirty();
}
diff --git a/libraries/render-utils/src/AntialiasingEffect.h b/libraries/render-utils/src/AntialiasingEffect.h
index fc253437516..ddb243f0649 100644
--- a/libraries/render-utils/src/AntialiasingEffect.h
+++ b/libraries/render-utils/src/AntialiasingEffect.h
@@ -110,11 +110,12 @@ class AntialiasingConfig : public render::Job::Config {
AntialiasingConfig() : render::Job::Config(true) {}
enum Mode {
- OFF = 0,
+ NONE = 0,
TAA,
FXAA,
MODE_COUNT
};
+ Q_ENUM(Mode) // Stored as signed int.
void setAAMode(int mode);
int getAAMode() const { return _mode; }
@@ -122,7 +123,7 @@ class AntialiasingConfig : public render::Job::Config {
void setDebugFXAA(bool debug) { debugFXAAX = (debug ? 0.0f : 1.0f); emit dirty();}
bool debugFXAA() const { return (debugFXAAX == 0.0f ? true : false); }
- int _mode{ TAA };
+ int _mode{ TAA }; // '_' prefix but not private?
float blend{ 0.25f };
float sharpen{ 0.05f };
@@ -216,8 +217,8 @@ class Antialiasing {
};
-#else
-class AntiAliasingConfig : public render::Job::Config {
+#else // User setting for antialias mode will probably be broken.
+class AntiAliasingConfig : public render::Job::Config { // Not to be confused with AntialiasingConfig...
Q_OBJECT
Q_PROPERTY(bool enabled MEMBER enabled)
public:
@@ -236,7 +237,7 @@ class Antialiasing {
const gpu::PipelinePointer& getAntialiasingPipeline();
const gpu::PipelinePointer& getBlendPipeline();
-
+
private:
gpu::FramebufferPointer _antialiasingBuffer;
diff --git a/prebuild.py b/prebuild.py
index f272b04b23b..5483703cb7e 100644
--- a/prebuild.py
+++ b/prebuild.py
@@ -58,22 +58,6 @@ def _log(self, msg, *args, **kwargs):
logging.setLoggerClass(TrackableLogger)
logger = logging.getLogger('prebuild')
-def headSha():
- if shutil.which('git') is None:
- logger.warn("Unable to find git executable, can't caclulate commit ID")
- return '0xDEADBEEF'
- repo_dir = os.path.dirname(os.path.abspath(__file__))
- git = subprocess.Popen(
- 'git rev-parse --short HEAD',
- stdout=subprocess.PIPE, stderr=subprocess.PIPE,
- shell=True, cwd=repo_dir, universal_newlines=True,
- )
- stdout, _ = git.communicate()
- sha = stdout.split('\n')[0]
- if not sha:
- raise RuntimeError("couldn't find git sha for repository {}".format(repo_dir))
- return sha
-
@contextmanager
def timer(name):
''' Print the elapsed time a context's execution takes to execute '''
@@ -120,7 +104,6 @@ def main():
if args.ci_build:
logging.basicConfig(datefmt='%H:%M:%S', format='%(asctime)s %(guid)s %(message)s', level=logging.INFO)
- logger.info('sha=%s' % headSha())
logger.info('start')
# OS dependent information
diff --git a/screenshare/package-lock.json b/screenshare/package-lock.json
index 16a98283578..dda7c85d8f0 100644
--- a/screenshare/package-lock.json
+++ b/screenshare/package-lock.json
@@ -71,9 +71,9 @@
}
},
"@types/node": {
- "version": "12.19.15",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.15.tgz",
- "integrity": "sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw==",
+ "version": "12.20.29",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.29.tgz",
+ "integrity": "sha512-dU2ypz+gO5va1OBvs0iT3BNHG5SgTqRvq8r+kU3e/LAseKapUJ8zTUE9Ve9fTpi27tN/7ahOAhCJwQWsffvsyw==",
"dev": true
},
"ansi-styles": {
@@ -162,9 +162,9 @@
"dev": true
},
"buffer-from": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
},
"cacheable-request": {
@@ -298,9 +298,9 @@
}
},
"core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"dev": true
},
"cross-zip": {
@@ -365,9 +365,9 @@
"dev": true
},
"electron": {
- "version": "9.4.0",
- "resolved": "https://registry.npmjs.org/electron/-/electron-9.4.0.tgz",
- "integrity": "sha512-hOC4q0jkb+UDYZRy8vrZ1IANnq+jznZnbkD62OEo06nU+hIbp2IrwDRBNuSLmQ3cwZMVir0WSIA1qEVK0PkzGA==",
+ "version": "11.5.0",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-11.5.0.tgz",
+ "integrity": "sha512-WjNDd6lGpxyiNjE3LhnFCAk/D9GIj1rU3GSDealVShhkkkPR3Vh4q8ErXGDl1OAO/faomVa10KoFPUN/pLbNxg==",
"dev": true,
"requires": {
"@electron/get": "^1.0.1",
diff --git a/screenshare/package.json b/screenshare/package.json
index 07d461f2529..c85b3fa6e14 100644
--- a/screenshare/package.json
+++ b/screenshare/package.json
@@ -18,7 +18,7 @@
},
"homepage": "https://github.com/highfidelity/hifi#readme",
"devDependencies": {
- "electron": "^9.4.0",
+ "electron": "^11.5.0",
"electron-packager": "^14.0.6"
},
"dependencies": {
diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js
index 02cd9a14ca8..aa4f7eb218c 100644
--- a/scripts/system/create/entityList/entityList.js
+++ b/scripts/system/create/entityList/entityList.js
@@ -203,8 +203,8 @@ EntityListTool = function(shouldUseEditTabletApp) {
var cameraPosition = Camera.position;
PROFILE("getMultipleProperties", function () {
var multipleProperties = Entities.getMultipleEntityProperties(ids, ['position', 'name', 'type', 'locked',
- 'visible', 'renderInfo', 'modelURL', 'materialURL', 'imageURL', 'script', 'certificateID',
- 'skybox.url', 'ambientLight.url', 'created', 'lastEdited']);
+ 'visible', 'renderInfo', 'modelURL', 'materialURL', 'imageURL', 'script', 'serverScripts',
+ 'certificateID', 'skybox.url', 'ambientLight.url', 'created', 'lastEdited']);
for (var i = 0; i < multipleProperties.length; i++) {
var properties = multipleProperties[i];
@@ -247,7 +247,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
isBaked: entityIsBaked(properties),
drawCalls: (properties.renderInfo !== undefined ?
valueIfDefined(properties.renderInfo.drawCalls) : ""),
- hasScript: properties.script !== "",
+ hasScript: (properties.script !== "" || properties.serverScripts !== ""),
parentState: parentState,
created: formatToStringDateTime(properties.created),
lastEdited: formatToStringDateTime(properties.lastEdited)
diff --git a/scripts/system/inventory/package-lock.json b/scripts/system/inventory/package-lock.json
index 78a14492c75..f7132eb5dc3 100644
--- a/scripts/system/inventory/package-lock.json
+++ b/scripts/system/inventory/package-lock.json
@@ -9228,6 +9228,12 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
},
+ "picocolors": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
+ "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
+ "dev": true
+ },
"picomatch": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
@@ -9302,14 +9308,13 @@
"dev": true
},
"postcss": {
- "version": "7.0.32",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz",
- "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==",
+ "version": "7.0.39",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
+ "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
"dev": true,
"requires": {
- "chalk": "^2.4.2",
- "source-map": "^0.6.1",
- "supports-color": "^6.1.0"
+ "picocolors": "^0.2.1",
+ "source-map": "^0.6.1"
},
"dependencies": {
"source-map": {
@@ -9317,15 +9322,6 @@
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
- },
- "supports-color": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
- "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
}
}
},