Cleaning up differnces from master

This commit is contained in:
Brad Davis 2019-02-07 13:33:11 -08:00
parent 23d7c0fb70
commit 070fb25b80
21 changed files with 72 additions and 53 deletions

View file

@ -81,6 +81,15 @@ if (ANDROID)
set(GLES_OPTION ON) set(GLES_OPTION ON)
set(PLATFORM_QT_COMPONENTS AndroidExtras WebView) set(PLATFORM_QT_COMPONENTS AndroidExtras WebView)
add_definitions(-DHIFI_ANDROID_APP=\"${HIFI_ANDROID_APP}\") add_definitions(-DHIFI_ANDROID_APP=\"${HIFI_ANDROID_APP}\")
if (${HIFI_ANDROID_APP} STREQUAL "questInterface")
# We know the quest hardware has this extension, so we can force the use of instanced stereo
add_definitions(-DHAVE_EXT_clip_cull_distance)
# We can also use multiview stereo techniques
add_definitions(-DHAVE_OVR_multiview2)
add_definitions(-DHAVE_OVR_multiview)
# We can also use our own foveated textures
add_definitions(-DHAVE_QCOM_texture_foveated)
endif()
else () else ()
set(PLATFORM_QT_COMPONENTS WebEngine) set(PLATFORM_QT_COMPONENTS WebEngine)
endif () endif ()

View file

@ -1,4 +1,4 @@
Source: hifi-client-deps Source: hifi-client-deps
Version: 0 Version: 0
Description: Collected dependencies for High Fidelity applications Description: Collected dependencies for High Fidelity applications
Build-Depends: hifi-deps, glslang, nlohmann-json, openvr (windows), sdl2, shaderc, spirv-cross, spirv-tools, vulkanmemoryallocator Build-Depends: hifi-deps, glslang, nlohmann-json, openvr (windows), sdl2 (!android), spirv-cross (!android), spirv-tools (!android), vulkanmemoryallocator

View file

@ -240,7 +240,6 @@ void LODManager::setAutomaticLODAdjust(bool value) {
} }
bool LODManager::shouldRender(const RenderArgs* args, const AABox& bounds) { bool LODManager::shouldRender(const RenderArgs* args, const AABox& bounds) {
return true;
// To decide if the bound should be rendered or not at the specified Args->lodAngle, // To decide if the bound should be rendered or not at the specified Args->lodAngle,
// we need to compute the apparent angle of the bound from the frustum origin, // we need to compute the apparent angle of the bound from the frustum origin,
// and compare it against the lodAngle, if it is greater or equal we should render the content of that bound. // and compare it against the lodAngle, if it is greater or equal we should render the content of that bound.

View file

@ -138,7 +138,7 @@ void LoginDialog::login(const QString& username, const QString& password) const
void LoginDialog::loginThroughOculus() { void LoginDialog::loginThroughOculus() {
qDebug() << "Attempting to login through Oculus"; qDebug() << "Attempting to login through Oculus";
if (auto oculusPlatformPlugin = PluginManager::getInstance()->getOculusPlatformPlugin()) { if (auto oculusPlatformPlugin = PluginManager::getInstance()->getOculusPlatformPlugin()) {
oculusPlatformPlugin->requestNonceAndUserID([] (QString nonce, QString oculusID) { oculusPlatformPlugin->requestNonceAndUserID([this] (QString nonce, QString oculusID) {
DependencyManager::get<AccountManager>()->requestAccessTokenWithOculus(nonce, oculusID); DependencyManager::get<AccountManager>()->requestAccessTokenWithOculus(nonce, oculusID);
}); });
} }

View file

@ -867,7 +867,7 @@ const AnimPoseVec& AnimInverseKinematics::evaluate(const AnimVariantMap& animVar
const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars, const AnimContext& context, float dt, AnimVariantMap& triggersOut, const AnimPoseVec& underPoses) { const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars, const AnimContext& context, float dt, AnimVariantMap& triggersOut, const AnimPoseVec& underPoses) {
#ifdef Q_OS_ANDROID #ifdef Q_OS_ANDROID
// disable IK on android // disable IK on android
// return underPoses; return underPoses;
#endif #endif
// allows solutionSource to be overridden by an animVar // allows solutionSource to be overridden by an animVar

View file

@ -269,7 +269,6 @@ bool OpenGLDisplayPlugin::activate() {
if (!widget->context()->makeCurrent()) { if (!widget->context()->makeCurrent()) {
throw std::runtime_error("Failed to make context current"); throw std::runtime_error("Failed to make context current");
} }
//_nativeContext = QOpenGLContextWrapper::currentContextWrapper()->getNativeContext();
CHECK_GL_ERROR(); CHECK_GL_ERROR();
widget->context()->doneCurrent(); widget->context()->doneCurrent();

View file

@ -22,7 +22,6 @@
#include <shared/RateCounter.h> #include <shared/RateCounter.h>
#include <gpu/Batch.h> #include <gpu/Batch.h>
#include <gl/QOpenGLContextWrapper.h>
namespace gpu { namespace gpu {
namespace gl { namespace gl {
@ -34,7 +33,6 @@ class OpenGLDisplayPlugin : public DisplayPlugin {
Q_OBJECT Q_OBJECT
Q_PROPERTY(float hudAlpha MEMBER _hudAlpha) Q_PROPERTY(float hudAlpha MEMBER _hudAlpha)
using Parent = DisplayPlugin; using Parent = DisplayPlugin;
using NativeContextPointer = QOpenGLContextWrapper::NativeContextPointer;
protected: protected:
using Mutex = std::mutex; using Mutex = std::mutex;
using Lock = std::unique_lock<Mutex>; using Lock = std::unique_lock<Mutex>;
@ -177,7 +175,6 @@ protected:
} }
gpu::gl::GLBackend* getGLBackend(); gpu::gl::GLBackend* getGLBackend();
//NativeContextPointer _nativeContext;
// Any resource shared by the main thread and the presentation thread must // Any resource shared by the main thread and the presentation thread must
// be serialized through this mutex // be serialized through this mutex

View file

@ -77,7 +77,6 @@ protected:
float _ipd { 0.064f }; float _ipd { 0.064f };
struct FrameInfo { struct FrameInfo {
uint32_t frameId{ 0 };
mat4 renderPose; mat4 renderPose;
mat4 presentPose; mat4 presentPose;
double sensorSampleTime { 0 }; double sensorSampleTime { 0 };

View file

@ -26,9 +26,6 @@
#include "Config.h" #include "Config.h"
#include "GLHelpers.h" #include "GLHelpers.h"
#include "QOpenGLContextWrapper.h" #include "QOpenGLContextWrapper.h"
#if defined(GL_CUSTOM_CONTEXT)
#include <QtPlatformHeaders/QWGLNativeContext>
#endif
using namespace gl; using namespace gl;

View file

@ -63,7 +63,6 @@ void Context::debugMessageHandler(const QOpenGLDebugMessage& debugMessage) {
case QOpenGLDebugMessage::LowSeverity: case QOpenGLDebugMessage::LowSeverity:
qCDebug(glLogging) << debugMessage; qCDebug(glLogging) << debugMessage;
return; return;
default: default:
qCWarning(glLogging) << debugMessage; qCWarning(glLogging) << debugMessage;
break; break;

View file

@ -19,7 +19,6 @@
#include <QtCore/QThread> #include <QtCore/QThread>
#include <QtCore/QThreadStorage> #include <QtCore/QThreadStorage>
#include <QtCore/QPointer> #include <QtCore/QPointer>
#include <QtCore/QCoreApplication>
#include <QtGui/QOffscreenSurface> #include <QtGui/QOffscreenSurface>
#include <QtGui/QOpenGLContext> #include <QtGui/QOpenGLContext>
#include <QtGui/QOpenGLDebugLogger> #include <QtGui/QOpenGLDebugLogger>
@ -60,7 +59,6 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) {
sharedContext->doneCurrent(); sharedContext->doneCurrent();
_context->setShareContext(sharedContext); _context->setShareContext(sharedContext);
} }
if (!_context->create()) { if (!_context->create()) {
qFatal("Failed to create OffscreenGLCanvas context"); qFatal("Failed to create OffscreenGLCanvas context");
} }

View file

@ -12,6 +12,7 @@
#include "QOpenGLContextWrapper.h" #include "QOpenGLContextWrapper.h"
#include <QOpenGLContext> #include <QOpenGLContext>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <QtPlatformHeaders/QWGLNativeContext> #include <QtPlatformHeaders/QWGLNativeContext>
#endif #endif

View file

@ -418,7 +418,7 @@ public:
#endif #endif
}; };
#ifndef GL_CLIP_DISTANCE0 #if defined(GPU_STEREO_DRAWCALL_INSTANCED) && !defined(GL_CLIP_DISTANCE0)
#define GL_CLIP_DISTANCE0 GL_CLIP_DISTANCE0_EXT #define GL_CLIP_DISTANCE0 GL_CLIP_DISTANCE0_EXT
#endif #endif
@ -426,10 +426,6 @@ public:
PROFILE_RANGE(category, name); \ PROFILE_RANGE(category, name); \
GlDuration glProfileRangeThis(name); GlDuration glProfileRangeThis(name);
#ifndef GL_CLIP_DISTANCE0
#define GL_CLIP_DISTANCE0 GL_CLIP_DISTANCE0_EXT
#endif
void GLBackend::render(const Batch& batch) { void GLBackend::render(const Batch& batch) {
GL_PROFILE_RANGE(render_gpu_gl, batch.getName().c_str()); GL_PROFILE_RANGE(render_gpu_gl, batch.getName().c_str());

View file

@ -32,7 +32,7 @@
// Different versions for the stereo drawcall // Different versions for the stereo drawcall
// Current preferred is "instanced" which draw the shape twice but instanced and rely on clipping plane to draw left/right side only // Current preferred is "instanced" which draw the shape twice but instanced and rely on clipping plane to draw left/right side only
#if defined(USE_GLES) && 0 #if defined(USE_GLES) && !defined(HAVE_EXT_clip_cull_distance)
#define GPU_STEREO_TECHNIQUE_DOUBLED_SIMPLE #define GPU_STEREO_TECHNIQUE_DOUBLED_SIMPLE
#else #else
//#define GPU_STEREO_TECHNIQUE_DOUBLED_SMARTER //#define GPU_STEREO_TECHNIQUE_DOUBLED_SMARTER

View file

@ -36,9 +36,6 @@ using namespace gpu::gl45;
#define ENABLE_SPARSE_TEXTURE 0 #define ENABLE_SPARSE_TEXTURE 0
bool GL45Backend::supportedTextureFormat(const gpu::Element& format) { bool GL45Backend::supportedTextureFormat(const gpu::Element& format) {
if (FORCE_MOBILE_TEXTURES) {
} else {
}
switch (format.getSemantic()) { switch (format.getSemantic()) {
// ETC textures are actually required by the OpenGL spec as of 4.3, but aren't always supported by hardware // ETC textures are actually required by the OpenGL spec as of 4.3, but aren't always supported by hardware
// They'll be recompressed by OpenGL, which will be slow or have poor quality, so disable them for now // They'll be recompressed by OpenGL, which will be slow or have poor quality, so disable them for now

View file

@ -14,23 +14,52 @@
(function() { // BEGIN LOCAL_SCOPE (function() { // BEGIN LOCAL_SCOPE
function addGotoButton(destination) { var button;
var buttonName = "GOTO";
var toolBar = null;
var tablet = null;
var onGotoScreen = false;
function onAddressBarShown(visible) {
button.editProperties({isActive: visible});
}
function onClicked(){
DialogsManager.toggleAddressBar();
onGotoScreen = !onGotoScreen;
}
if (Settings.getValue("HUDUIEnabled")) {
toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
button = toolBar.addButton({
objectName: buttonName,
imageURL: Script.resolvePath("assets/images/tools/directory.svg"),
visible: true,
alpha: 0.9
});
} else {
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
button = tablet.addButton({ button = tablet.addButton({
icon: "icons/tablet-icons/goto-i.svg", icon: "icons/tablet-icons/goto-i.svg",
activeIcon: "icons/tablet-icons/goto-a.svg", activeIcon: "icons/tablet-icons/goto-a.svg",
text: destination text: buttonName
});
var buttonDestination = destination;
button.clicked.connect(function() {
Window.location = "hifi://" + buttonDestination;
});
Script.scriptEnding.connect(function () {
tablet.removeButton(button);
}); });
} }
addGotoButton("hell") button.clicked.connect(onClicked);
addGotoButton("dev-mobile") DialogsManager.addressBarShown.connect(onAddressBarShown);
Script.scriptEnding.connect(function () {
if (onGotoScreen) {
DialogsManager.toggleAddressBar();
}
button.clicked.disconnect(onClicked);
if (tablet) {
tablet.removeButton(button);
}
if (toolBar) {
toolBar.removeButton(buttonName);
}
DialogsManager.addressBarShown.disconnect(onAddressBarShown);
});
}()); // END LOCAL_SCOPE }()); // END LOCAL_SCOPE

View file

@ -135,18 +135,18 @@
gotoImage = document.getElementById("goto-img"); gotoImage = document.getElementById("goto-img");
expandButton = document.getElementById("expand"); expandButton = document.getElementById("expand");
connectEventBridge(); connectEventBridge();
document.body.addEventListener("mouseenter", onBodyHover, false); document.body.addEventListener("mouseenter", onBodyHover, false);
document.body.addEventListener("mouseleave", onBodyUnhover, false); document.body.addEventListener("mouseleave", onBodyUnhover, false);
muteButton.addEventListener("mouseenter", onButtonHover, false); muteButton.addEventListener("mouseenter", onButtonHover, false);
gotoButton.addEventListener("mouseenter", onButtonHover, false); gotoButton.addEventListener("mouseenter", onButtonHover, false);
expandButton.addEventListener("mouseenter", onButtonHover, false); expandButton.addEventListener("mouseenter", onButtonHover, false);
muteButton.addEventListener("click", onMuteButtonClick, true); muteButton.addEventListener("click", onMuteButtonClick, true);
gotoButton.addEventListener("click", onGotoButtonClick, true); gotoButton.addEventListener("click", onGotoButtonClick, true);
expandButton.addEventListener("click", onExpandButtonClick, true); expandButton.addEventListener("click", onExpandButtonClick, true);
document.body.onunload = function () { document.body.onunload = function () {
onUnload(); onUnload();
}; };

View file

@ -44,12 +44,11 @@
return; return;
} }
print("DEBUG: " + message); print("DEBUG: " + message);
} }
function error(message) { function error(message) {
print("ERROR: " + message); print("ERROR: " + message);
} }
function handJointName(hand) { function handJointName(hand) {
var jointName; var jointName;
@ -127,7 +126,7 @@
miniOverlayObject = null, miniOverlayObject = null,
// Button icons. // Button icons.
MUTE_ON_ICON =Script.resourcesPath() + "icons/tablet-icons/mic-mute-a.svg", MUTE_ON_ICON = Script.resourcesPath() + "icons/tablet-icons/mic-mute-a.svg",
MUTE_OFF_ICON = Script.resourcesPath() + "icons/tablet-icons/mic-unmute-i.svg", MUTE_OFF_ICON = Script.resourcesPath() + "icons/tablet-icons/mic-unmute-i.svg",
GOTO_ICON = Script.resourcesPath() + "icons/tablet-icons/goto-i.svg", GOTO_ICON = Script.resourcesPath() + "icons/tablet-icons/goto-i.svg",

View file

@ -31,7 +31,6 @@ if (BUILD_TOOLS)
atp-client atp-client
oven oven
nitpick nitpick
webview
) )
foreach(TOOL ${ALL_TOOLS}) foreach(TOOL ${ALL_TOOLS})

View file

@ -4,9 +4,10 @@ set(TARGET_NAME gpu-frame-player)
setup_memory_debugger() setup_memory_debugger()
setup_hifi_project(Gui Widgets) setup_hifi_project(Gui Widgets)
# link in the shared libraries # link in the shared libraries
link_hifi_libraries( link_hifi_libraries(
shared ktx shaders gpu shared ktx shaders gpu
# vk gpu-vk # vk gpu-vk
gl ${PLATFORM_GL_BACKEND} gl ${PLATFORM_GL_BACKEND}
) )

View file

@ -137,7 +137,7 @@
direction: this.firingDirection direction: this.firingDirection
}; };
this.createGunFireEffect(this.barrelPoint) this.createGunFireEffect(this.barrelPoint)
var intersection = Entities.findRayIntersectionBlocking(pickRay, true); var intersection = Entities.findRayIntersection(pickRay, true);
if (intersection.intersects) { if (intersection.intersects) {
this.createEntityHitEffect(intersection.intersection); this.createEntityHitEffect(intersection.intersection);
if (Math.random() < this.playRichochetSoundChance) { if (Math.random() < this.playRichochetSoundChance) {