I am duplicating this question from opengl.org.
I know technically openGL does not have a camera. I am a total beginner, but if I understand correctly, I can move the "camera" or my "eye" with function gluLookAt. But: gluLookAt looks at a scene from one specific point (it uses a perspective). Since I am using glOrtho, I do not have a specific point from where to look at. I project a scene to a square, so all I need to define my "camera" is not a one-point "eye" but a square in space, and a direction from which I need to project the scene to that square. So if I have a direction defined with a vector, and I have a rectangle to which I want to project - how do I do that?
Here's a quick sketch of what I want to achieve. I have a rectangle defined with X1, X2, X3 and X4 - and a vector of direction in which I want to view. I only want to view in that direction, not interested in what's behind a "camera". The only problem here is I do not have a "camera" but rather a "screen" or "canvas" on which I want to project.
Here's what's a normal projection with glOrtho looks like:
Here's what I want to do:
Any help will be really appreciated.