ofSetupScreenOrtho and Isometric View

Hello everyone,

I’m trying to accomplish an isometric 2D View for a game I’ve been building.
I’m not exactly sure how to do this, so I’ve stumbled upon ofSetupScreenOrtho and it seems to be something I should use. Can anyone give a tip or an example on how to do this? Is ofSetupScreenOrtho really the correct approach?

Thanks in advance!

I’m having a similar problem. Trying to use the following line in my setup:

ofSetupScreenOrtho(ofGetWidth(),ofGetHeight());

Unfortunately it makes no difference to the output and I’m still getting perspective distortion (for example, looking face on at a cube, the back face is smaller than the front due to perspective).

Any got any tips?

Hi, I’d play around with the ofCamera enableOrtho() function, might do what you need.

Thanks hahakid. I haven’t used ofCamera before, struggling to find a usable example - trying to use it in the following way but I’m sure I’m being a noob:

in ofApp.h

#include "ofCamera.h"
ofCamera cam;

in ofApp::setup() of ofApp.cpp

cam.enableOrtho();

Can’t get my head around how cameras behave (do they ‘override’ the default camera?). If you know of any tutorials or examples please send them my way!

1 Like

Hi,

Any closure regarding what’s up with ofSetupScreenOrtho()? Like misterblix, it doesn’t seem to have any effect for me, but apparently it’s also deprecated…

update: my mistake, what’s actually deprecated is just ofSetupScreenOrtho(float width, float height, ofOrientation orientation), leave out the orientation param.

And it needs to be placed in the draw loop to have an effect.