Making some progress on this.
Here is what I have thus far
ofEasyCam cam = ofEasyCam();
ofRectangle viewport;
//--------------------------------------------------------------
void ofApp::setup(){
cam.setupPerspective();
cam.enableOrtho();
viewport = ofGetCurrentViewport();
}
void ofApp::draw(){
cam.setupPerspective();
cam.begin(viewport);
ofSetColor(0, 255, 0);
ofFill();
ofDrawPlane(0,0,0 , 100, 100);
ofSetColor(255, 0, 0);
ofFill();
ofDrawPlane(250, 150, 0, 100, 100);
ofSetColor(0, 0, 255);
ofFill();
ofDrawPlane(150, 250, 0, 100, 100);
ofSetColor(255, 255, 0);
ofFill();
ofDrawPlane(250, 250, 0, 100, 100);
cam.end();
}
However, I am running into two issues.
First, I have to call cam.setupPerspective(); every draw call, or else the camera resets the origin (0,0) to the middle of the screen. This is something ofEastCam is doing behind the scenes, since just using ofCamera doesnt have this issue. (I want to use ofEasyCam as I want to be able to rotate the view eventually).
Second, if I draw a plane at 0,0,0, with width / height of 100 in 3D, it is actually drawn at the middle point of the plane (i.e. -50, -50). Is this normal, and is there a setting to make it use the same coordinate space as 2d.
Basically, I am trying to draw in 2D (maybe with different z orders) and then rotate in 3D.