mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 14:33:31 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into avoid-ds-ice-metaverse-race
This commit is contained in:
commit
06db46e38a
4 changed files with 17 additions and 2 deletions
|
@ -478,7 +478,8 @@ bool EntityTreeRenderer::applySkyboxAndHasAmbient() {
|
|||
}
|
||||
}
|
||||
|
||||
if (_pendingSkyboxTexture && !_skyboxTexture) {
|
||||
if (_pendingSkyboxTexture &&
|
||||
(!_skyboxTexture || (_skyboxTexture->getURL() != _skyboxTextureURL))) {
|
||||
_skyboxTexture = textureCache->getTexture(_skyboxTextureURL, NetworkTexture::CUBE_TEXTURE);
|
||||
}
|
||||
if (_skyboxTexture && _skyboxTexture->isLoaded()) {
|
||||
|
|
|
@ -83,6 +83,9 @@ bool RenderableWebEntityItem::buildWebSurface(EntityTreeRenderer* renderer) {
|
|||
++_currentWebCount;
|
||||
// Save the original GL context, because creating a QML surface will create a new context
|
||||
QOpenGLContext * currentContext = QOpenGLContext::currentContext();
|
||||
if (!currentContext) {
|
||||
return false;
|
||||
}
|
||||
QSurface * currentSurface = currentContext->surface();
|
||||
|
||||
auto deleter = [](OffscreenQmlSurface* webSurface) {
|
||||
|
|
|
@ -308,6 +308,17 @@ function hudReticleDistance() { // 3d distance from camera to the reticle positi
|
|||
var reticlePositionOnHUD = HMD.worldPointFromOverlay(Reticle.position);
|
||||
return Vec3.distance(reticlePositionOnHUD, HMD.position);
|
||||
}
|
||||
|
||||
function maybeAdjustReticleDepth() {
|
||||
if (HMD.active) { // set depth
|
||||
if (isPointingAtOverlay()) {
|
||||
Reticle.depth = hudReticleDistance();
|
||||
}
|
||||
}
|
||||
}
|
||||
var ADJUST_RETICLE_DEPTH_INTERVAL = 50; // 20hz
|
||||
Script.setInterval(maybeAdjustReticleDepth,ADJUST_RETICLE_DEPTH_INTERVAL);
|
||||
|
||||
function onMouseMove() {
|
||||
// Display cursor at correct depth (as in depthReticle.js), and updateMouseActivity.
|
||||
if (ignoreMouseActivity()) {
|
||||
|
|
|
@ -193,7 +193,7 @@ var triggerMapping = Controller.newMapping(Script.resolvePath('') + '-click');
|
|||
function controllerComputePickRay(hand) {
|
||||
var controllerPose = getControllerWorldLocation(hand, true);
|
||||
if (controllerPose.valid) {
|
||||
return { origin: controllerPose.position, direction: controllerPose.orientation };
|
||||
return { origin: controllerPose.position, direction: Quat.getUp(controllerPose.orientation) };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue