Orthographic Zooming with 0,0 at top/left

Posted by Sean M. on Game Development See other posts from Game Development or by Sean M.
Published on 2013-09-19T03:28:29Z Indexed on 2013/10/20 22:13 UTC
Read the original article Hit count: 387

Filed under:
|
|
|
|

I'm trying to implement zooming on my 2D game. Since it's using orthographic projection, I thought it would be easy to implement zooming. After looking around the internet, I found a bunch of explanations and samples on how to do this if (0,0) is the center of the screen with the orthographic projection. The problem is, my ortho projection has (0,0) at the top-left (similar to XNA/Monogame, and a couple others). I could not find any examples about how to implement zooming to the center of the screen when the center is not (0,0).

And help/links/code examples would be greatly appreciated.

© Game Development or respective owner

Related posts about c++

Related posts about opengl