How to set an orthographic view?

Hello everybody,

In Processing, you can set an orthographic view/projection with ortho(). I was wandering how I could achieve that in OF?

Here’s a link to what the Processing function does.


my favorite way for using orthographic projection is with an ofEasyCam instanced set up in the way I describe here
That allows you to navigate your orthographic projection with the mouse.


Hi @roymacdonald,

Thanks again for your help! You’re the best!

In Processing, you can also set the left, right, and bottom planes of the clipping volume, additionally to the far and near clip distance. Would that also be feasible in OF?

1 Like

what you do is to use a “viewport” which simply is a rectangle that defines the area of the screen where to draw the camera and based on it how it will be clipped.
If you are using the method I pointed out previously, you can pass an ofRectangle to the ofEasyCam begin method.
so, assuming you have an ofEasyCam named cam you call cam.begin(ofRectangle(200, 100, 400, ofGetHeight() -300); instead of cam.begin(); It is up to you which values you put in the ofRectangle.


Yes, I am. Works like a charm! Thank you.

1 Like