mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 21:56:26 +02:00
Fix for 3DTV mode with non-unity render scale.
This commit is contained in:
parent
e66a96b020
commit
4475bb89d5
1 changed files with 6 additions and 5 deletions
|
@ -91,8 +91,10 @@ void TV3DManager::display(Camera& whichCamera) {
|
||||||
// left eye portal
|
// left eye portal
|
||||||
int portalX = 0;
|
int portalX = 0;
|
||||||
int portalY = 0;
|
int portalY = 0;
|
||||||
int portalW = Application::getInstance()->getGLWidget()->getDeviceWidth() / 2;
|
QSize deviceSize = Application::getInstance()->getGLWidget()->getDeviceSize() *
|
||||||
int portalH = Application::getInstance()->getGLWidget()->getDeviceHeight();
|
Application::getInstance()->getRenderResolutionScale();
|
||||||
|
int portalW = deviceSize.width() / 2;
|
||||||
|
int portalH = deviceSize.height();
|
||||||
|
|
||||||
ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay();
|
ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay();
|
||||||
|
|
||||||
|
@ -135,7 +137,7 @@ void TV3DManager::display(Camera& whichCamera) {
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
// render right side view
|
// render right side view
|
||||||
portalX = Application::getInstance()->getGLWidget()->getDeviceWidth() / 2;
|
portalX = deviceSize.width() / 2;
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
// render left side view
|
// render left side view
|
||||||
glViewport(portalX, portalY, portalW, portalH);
|
glViewport(portalX, portalY, portalW, portalH);
|
||||||
|
@ -165,8 +167,7 @@ void TV3DManager::display(Camera& whichCamera) {
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
// reset the viewport to how we started
|
// reset the viewport to how we started
|
||||||
glViewport(0, 0, Application::getInstance()->getGLWidget()->getDeviceWidth(),
|
glViewport(0, 0, deviceSize.width(), deviceSize.height());
|
||||||
Application::getInstance()->getGLWidget()->getDeviceHeight());
|
|
||||||
|
|
||||||
Application::getInstance()->getGlowEffect()->render();
|
Application::getInstance()->getGlowEffect()->render();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue