Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cgmath::ortho(0.0, 800.0, 0.0, 600.0, -1.0, 1.0) yields
- [0.0025, 0, 0, -1]
- [0, 0.004, 0, -1]
- [0, 0, -1, 0]
- [0, 0, 0, 1]
- which I believe is correct.
- nalgebra::OrthoMat3::new(800.0, 600.0, -1.0, 1.0) yields
- [0.0025, 0, 0, 0]
- [0, 0.003333, 0, 0]
- [0, 0, -1, 0]
- [0, 0, 0, 1]
- which doesn't work
- based on the wikipedia page http://en.wikipedia.org/wiki/Orthographic_projection, you are missing the top two values on the right most column
- -((800 + 0)/(800 - 0)), -((600 + 0)/(600 - 0))
- However, I do note that your ortho matrix doesn't really have a left/right and top/bottom, just a width and height so perhaps I'm missing something.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement