mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 16:49:58 +02:00
render mirror box
This commit is contained in:
parent
2e84d1e213
commit
63533e66c1
2 changed files with 13 additions and 2 deletions
|
@ -425,7 +425,6 @@ void Application::paintGL() {
|
|||
} else {
|
||||
_glowEffect.prepare();
|
||||
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
@ -434,6 +433,17 @@ void Application::paintGL() {
|
|||
|
||||
_glowEffect.render();
|
||||
|
||||
// mirror
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {
|
||||
glViewport(50, 600, 265, 215);
|
||||
glLogicOp(GL_CLEAR);
|
||||
_mirrorCamera.setMode(CAMERA_MODE_MIRROR);
|
||||
displaySide(_mirrorCamera);
|
||||
|
||||
glViewport(0, 0, _glWidget->width(), _glWidget->height());
|
||||
}
|
||||
// mirror
|
||||
|
||||
displayOverlay();
|
||||
}
|
||||
|
||||
|
@ -2482,7 +2492,6 @@ void Application::displaySide(Camera& whichCamera) {
|
|||
if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {
|
||||
glScalef(-1.0f, 1.0f, 1.0f);
|
||||
glFrontFace(GL_CW);
|
||||
|
||||
} else {
|
||||
glFrontFace(GL_CCW);
|
||||
}
|
||||
|
@ -2770,6 +2779,7 @@ void Application::displaySide(Camera& whichCamera) {
|
|||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Application::displayOverlay() {
|
||||
|
|
|
@ -294,6 +294,7 @@ private:
|
|||
|
||||
Camera _myCamera; // My view onto the world
|
||||
Camera _viewFrustumOffsetCamera; // The camera we use to sometimes show the view frustum from an offset mode
|
||||
Camera _mirrorCamera;
|
||||
|
||||
Environment _environment;
|
||||
|
||||
|
|
Loading…
Reference in a new issue