mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 03:22:27 +02:00
Cleaning up differnces from master
This commit is contained in:
parent
23d7c0fb70
commit
070fb25b80
21 changed files with 72 additions and 53 deletions
|
@ -81,6 +81,15 @@ if (ANDROID)
|
|||
set(GLES_OPTION ON)
|
||||
set(PLATFORM_QT_COMPONENTS AndroidExtras WebView)
|
||||
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 ()
|
||||
set(PLATFORM_QT_COMPONENTS WebEngine)
|
||||
endif ()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Source: hifi-client-deps
|
||||
Version: 0
|
||||
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
|
||||
|
|
|
@ -240,7 +240,6 @@ void LODManager::setAutomaticLODAdjust(bool value) {
|
|||
}
|
||||
|
||||
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,
|
||||
// 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.
|
||||
|
|
|
@ -138,7 +138,7 @@ void LoginDialog::login(const QString& username, const QString& password) const
|
|||
void LoginDialog::loginThroughOculus() {
|
||||
qDebug() << "Attempting to login through Oculus";
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
#ifdef Q_OS_ANDROID
|
||||
// disable IK on android
|
||||
// return underPoses;
|
||||
return underPoses;
|
||||
#endif
|
||||
|
||||
// allows solutionSource to be overridden by an animVar
|
||||
|
|
|
@ -269,7 +269,6 @@ bool OpenGLDisplayPlugin::activate() {
|
|||
if (!widget->context()->makeCurrent()) {
|
||||
throw std::runtime_error("Failed to make context current");
|
||||
}
|
||||
//_nativeContext = QOpenGLContextWrapper::currentContextWrapper()->getNativeContext();
|
||||
CHECK_GL_ERROR();
|
||||
widget->context()->doneCurrent();
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <shared/RateCounter.h>
|
||||
|
||||
#include <gpu/Batch.h>
|
||||
#include <gl/QOpenGLContextWrapper.h>
|
||||
|
||||
namespace gpu {
|
||||
namespace gl {
|
||||
|
@ -34,7 +33,6 @@ class OpenGLDisplayPlugin : public DisplayPlugin {
|
|||
Q_OBJECT
|
||||
Q_PROPERTY(float hudAlpha MEMBER _hudAlpha)
|
||||
using Parent = DisplayPlugin;
|
||||
using NativeContextPointer = QOpenGLContextWrapper::NativeContextPointer;
|
||||
protected:
|
||||
using Mutex = std::mutex;
|
||||
using Lock = std::unique_lock<Mutex>;
|
||||
|
@ -177,7 +175,6 @@ protected:
|
|||
}
|
||||
|
||||
gpu::gl::GLBackend* getGLBackend();
|
||||
//NativeContextPointer _nativeContext;
|
||||
|
||||
// Any resource shared by the main thread and the presentation thread must
|
||||
// be serialized through this mutex
|
||||
|
|
|
@ -77,7 +77,6 @@ protected:
|
|||
float _ipd { 0.064f };
|
||||
|
||||
struct FrameInfo {
|
||||
uint32_t frameId{ 0 };
|
||||
mat4 renderPose;
|
||||
mat4 presentPose;
|
||||
double sensorSampleTime { 0 };
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
#include "Config.h"
|
||||
#include "GLHelpers.h"
|
||||
#include "QOpenGLContextWrapper.h"
|
||||
#if defined(GL_CUSTOM_CONTEXT)
|
||||
#include <QtPlatformHeaders/QWGLNativeContext>
|
||||
#endif
|
||||
|
||||
using namespace gl;
|
||||
|
||||
|
|
|
@ -63,7 +63,6 @@ void Context::debugMessageHandler(const QOpenGLDebugMessage& debugMessage) {
|
|||
case QOpenGLDebugMessage::LowSeverity:
|
||||
qCDebug(glLogging) << debugMessage;
|
||||
return;
|
||||
|
||||
default:
|
||||
qCWarning(glLogging) << debugMessage;
|
||||
break;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <QtCore/QThread>
|
||||
#include <QtCore/QThreadStorage>
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtGui/QOffscreenSurface>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
#include <QtGui/QOpenGLDebugLogger>
|
||||
|
@ -60,7 +59,6 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) {
|
|||
sharedContext->doneCurrent();
|
||||
_context->setShareContext(sharedContext);
|
||||
}
|
||||
|
||||
if (!_context->create()) {
|
||||
qFatal("Failed to create OffscreenGLCanvas context");
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "QOpenGLContextWrapper.h"
|
||||
|
||||
#include <QOpenGLContext>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <QtPlatformHeaders/QWGLNativeContext>
|
||||
#endif
|
||||
|
|
|
@ -418,7 +418,7 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
#ifndef GL_CLIP_DISTANCE0
|
||||
#if defined(GPU_STEREO_DRAWCALL_INSTANCED) && !defined(GL_CLIP_DISTANCE0)
|
||||
#define GL_CLIP_DISTANCE0 GL_CLIP_DISTANCE0_EXT
|
||||
#endif
|
||||
|
||||
|
@ -426,10 +426,6 @@ public:
|
|||
PROFILE_RANGE(category, name); \
|
||||
GlDuration glProfileRangeThis(name);
|
||||
|
||||
#ifndef GL_CLIP_DISTANCE0
|
||||
#define GL_CLIP_DISTANCE0 GL_CLIP_DISTANCE0_EXT
|
||||
#endif
|
||||
|
||||
void GLBackend::render(const Batch& batch) {
|
||||
GL_PROFILE_RANGE(render_gpu_gl, batch.getName().c_str());
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
// 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
|
||||
#if defined(USE_GLES) && 0
|
||||
#if defined(USE_GLES) && !defined(HAVE_EXT_clip_cull_distance)
|
||||
#define GPU_STEREO_TECHNIQUE_DOUBLED_SIMPLE
|
||||
#else
|
||||
//#define GPU_STEREO_TECHNIQUE_DOUBLED_SMARTER
|
||||
|
|
|
@ -36,9 +36,6 @@ using namespace gpu::gl45;
|
|||
#define ENABLE_SPARSE_TEXTURE 0
|
||||
|
||||
bool GL45Backend::supportedTextureFormat(const gpu::Element& format) {
|
||||
if (FORCE_MOBILE_TEXTURES) {
|
||||
} else {
|
||||
}
|
||||
switch (format.getSemantic()) {
|
||||
// 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
|
||||
|
|
|
@ -14,23 +14,52 @@
|
|||
|
||||
(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");
|
||||
button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/goto-i.svg",
|
||||
activeIcon: "icons/tablet-icons/goto-a.svg",
|
||||
text: destination
|
||||
});
|
||||
var buttonDestination = destination;
|
||||
button.clicked.connect(function() {
|
||||
Window.location = "hifi://" + buttonDestination;
|
||||
});
|
||||
Script.scriptEnding.connect(function () {
|
||||
tablet.removeButton(button);
|
||||
text: buttonName
|
||||
});
|
||||
}
|
||||
|
||||
addGotoButton("hell")
|
||||
addGotoButton("dev-mobile")
|
||||
button.clicked.connect(onClicked);
|
||||
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
|
||||
|
|
|
@ -135,18 +135,18 @@
|
|||
gotoImage = document.getElementById("goto-img");
|
||||
expandButton = document.getElementById("expand");
|
||||
|
||||
connectEventBridge();
|
||||
|
||||
document.body.addEventListener("mouseenter", onBodyHover, false);
|
||||
document.body.addEventListener("mouseleave", onBodyUnhover, false);
|
||||
|
||||
muteButton.addEventListener("mouseenter", onButtonHover, false);
|
||||
gotoButton.addEventListener("mouseenter", onButtonHover, false);
|
||||
expandButton.addEventListener("mouseenter", onButtonHover, false);
|
||||
muteButton.addEventListener("click", onMuteButtonClick, true);
|
||||
gotoButton.addEventListener("click", onGotoButtonClick, true);
|
||||
expandButton.addEventListener("click", onExpandButtonClick, true);
|
||||
|
||||
connectEventBridge();
|
||||
|
||||
document.body.addEventListener("mouseenter", onBodyHover, false);
|
||||
document.body.addEventListener("mouseleave", onBodyUnhover, false);
|
||||
|
||||
muteButton.addEventListener("mouseenter", onButtonHover, false);
|
||||
gotoButton.addEventListener("mouseenter", onButtonHover, false);
|
||||
expandButton.addEventListener("mouseenter", onButtonHover, false);
|
||||
muteButton.addEventListener("click", onMuteButtonClick, true);
|
||||
gotoButton.addEventListener("click", onGotoButtonClick, true);
|
||||
expandButton.addEventListener("click", onExpandButtonClick, true);
|
||||
|
||||
document.body.onunload = function () {
|
||||
onUnload();
|
||||
};
|
||||
|
|
|
@ -44,12 +44,11 @@
|
|||
return;
|
||||
}
|
||||
print("DEBUG: " + message);
|
||||
|
||||
}
|
||||
|
||||
function error(message) {
|
||||
print("ERROR: " + message);
|
||||
}
|
||||
}
|
||||
|
||||
function handJointName(hand) {
|
||||
var jointName;
|
||||
|
@ -127,7 +126,7 @@
|
|||
miniOverlayObject = null,
|
||||
|
||||
// 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",
|
||||
GOTO_ICON = Script.resourcesPath() + "icons/tablet-icons/goto-i.svg",
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ if (BUILD_TOOLS)
|
|||
atp-client
|
||||
oven
|
||||
nitpick
|
||||
webview
|
||||
)
|
||||
|
||||
foreach(TOOL ${ALL_TOOLS})
|
||||
|
|
|
@ -4,9 +4,10 @@ set(TARGET_NAME gpu-frame-player)
|
|||
setup_memory_debugger()
|
||||
setup_hifi_project(Gui Widgets)
|
||||
|
||||
|
||||
# link in the shared libraries
|
||||
link_hifi_libraries(
|
||||
shared ktx shaders gpu
|
||||
shared ktx shaders gpu
|
||||
# vk gpu-vk
|
||||
gl ${PLATFORM_GL_BACKEND}
|
||||
)
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
direction: this.firingDirection
|
||||
};
|
||||
this.createGunFireEffect(this.barrelPoint)
|
||||
var intersection = Entities.findRayIntersectionBlocking(pickRay, true);
|
||||
var intersection = Entities.findRayIntersection(pickRay, true);
|
||||
if (intersection.intersects) {
|
||||
this.createEntityHitEffect(intersection.intersection);
|
||||
if (Math.random() < this.playRichochetSoundChance) {
|
||||
|
|
Loading…
Reference in a new issue