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
3386 // load the view frustum3386 // load the view frustum
3387 loadViewFrustum(theCamera, _displayViewFrustum);3387 loadViewFrustum(theCamera, _displayViewFrustum);
3388 3388
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
3397 // transform view according to theCamera3389 // transform view according to theCamera
3398 // could be myCamera (if in normal mode)3390 // could be myCamera (if in normal mode)
3399 // or could be viewFrustumOffsetCamera if in offset mode3391 // or could be viewFrustumOffsetCamera if in offset mode
@@ -3411,9 +3403,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 11 unmodified lines
3411 Transform viewTransform;3403 Transform viewTransform;
3412 viewTransform.setTranslation(theCamera.getPosition());3404 viewTransform.setTranslation(theCamera.getPosition());
3413 viewTransform.setRotation(rotation);3405 viewTransform.setRotation(rotation);
3414 if (theCamera.getMode() == CAMERA_MODE_MIRROR) {
3415// viewTransform.setScale(Transform::Vec3(-1.0f, 1.0f, 1.0f));
3416 }
3417 if (renderArgs->_renderSide != RenderArgs::MONO) {3406 if (renderArgs->_renderSide != RenderArgs::MONO) {
3418 glm::mat4 invView = glm::inverse(_untranslatedViewMatrix);3407 glm::mat4 invView = glm::inverse(_untranslatedViewMatrix);
3419 3408