Orthographic projection should be relative to the viewport. #2675
+8
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The orthographic projection matrix had hardcoded left and bottom values of 0, meaning that when a camera was rotated, it would appear as if the entire scene had been rotated around the bottom left corner of the screen, regardless of where the camera was positioned.
IMHO, the view of your scene should be roughly similar when toggling between these two projections. A different projection should not require any fiddly translation by a developer to compensate. It should be handled internally by ofCamera.
Here are some screenshots to demonstrate what I'm talking about.
Positions of primitives in space:
Red cube is at (0, 0, 0)
Green sphere is at (0, 0, -128)
Blue cube is at (128, 0, 0)
Cyan box is at (128, 64, 0)
Front Current
Front Fixed
Left Current
Left Fixed