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 libraries/render-utils/src/RenderDeferredTask.cpp (1 of 3 files). Show all

Unified · Split

libraries/render-utils/src/RenderDeferredTask.cpp+1−1
@@ -118,7 +118,7 @@ void DrawOpaqueDeferred::run(const SceneContextPointer& sceneContext, const Rend · 117 unmodified lines
118118 args->_viewFrustum->evalProjectionMatrix(projMat);
119119 args->_viewFrustum->evalViewTransform(viewMat);
120120 if (args->_renderMode == RenderArgs::MIRROR_RENDER_MODE) {
121− viewMat.postScale(glm::vec3(-1.0f, 1.0f, 1.0f));
121+ viewMat.preScale(glm::vec3(-1.0f, 1.0f, 1.0f));
122122 }
123123 batch.setProjectionTransform(projMat);
124124 batch.setViewTransform(viewMat);