mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 14:03:17 +02:00
Need to call resizeGL in order to update the projection matrix.
This commit is contained in:
parent
3a195951db
commit
dd8a40decd
1 changed files with 2 additions and 0 deletions
|
@ -1806,10 +1806,12 @@ void Application::update(float deltaTime) {
|
|||
const float EYE_OFFSET_SCALE = 0.1f;
|
||||
glm::vec3 position = _faceshift.getHeadTranslation() * EYE_OFFSET_SCALE;
|
||||
_myCamera.setEyeOffsetPosition(glm::vec3(-position.x, position.y, position.z));
|
||||
resizeGL(_glWidget->width(), _glWidget->height());
|
||||
|
||||
} else if (_webcam.isActive()) {
|
||||
const float EYE_OFFSET_SCALE = 5.0f;
|
||||
_myCamera.setEyeOffsetPosition(_webcam.getEstimatedPosition() * EYE_OFFSET_SCALE);
|
||||
resizeGL(_glWidget->width(), _glWidget->height());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue