History

fix for mirror rendering on windows

* added preScale to Transform class. * preScale by -1 about the xAxis instead of post scale. I think this was working on Mac due to the different code paths in GLBackendTransform::updateTransform for core vs legacy gl profile.

Anthony J. Thibault committed 11 years ago

Commit 1be0e7e1 parent 82cad5d3 files · +11 −12Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+0−11
@@ -3386,14 +3386,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 3385 unmodified lines
33863386 // load the view frustum
33873387 loadViewFrustum(theCamera, _displayViewFrustum);
33883388
3389− // flip x if in mirror mode (also requires reversing winding order for backface culling)
3390− if (theCamera.getMode() == CAMERA_MODE_MIRROR) {
3391− //glScalef(-1.0f, 1.0f, 1.0f);
3392− //glFrontFace(GL_CW);
3393− } else {
3394− glFrontFace(GL_CCW);
3395− }
3396−
33973389 // transform view according to theCamera
33983390 // could be myCamera (if in normal mode)
33993391 // or could be viewFrustumOffsetCamera if in offset mode
@@ -3411,9 +3403,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 11 unmodified lines
34113403 Transform viewTransform;
34123404 viewTransform.setTranslation(theCamera.getPosition());
34133405 viewTransform.setRotation(rotation);
3414− if (theCamera.getMode() == CAMERA_MODE_MIRROR) {
3415−// viewTransform.setScale(Transform::Vec3(-1.0f, 1.0f, 1.0f));
3416− }
34173406 if (renderArgs->_renderSide != RenderArgs::MONO) {
34183407 glm::mat4 invView = glm::inverse(_untranslatedViewMatrix);
34193408