Merge branch 'master' of github.com:highfidelity/hifi into avoid-ds-ice-metaverse-race

This commit is contained in:
Seth Alves 2016-10-10 15:37:41 -07:00
commit 06db46e38a
4 changed files with 17 additions and 2 deletions

View file

@ -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()) {

View file

@ -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) {

View file

@ -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()) {

View file

@ -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) };
}
}