Open neilmendoza opened 1 month ago
The below code should create a view from [-1, -1] to [1, 1] and draw a square in the upper right quadrant...
fbo.begin(OF_FBOMODE_NODEFAULTS); ofClear(0, 255); ofSetColor(255); ofDrawRectangle(0, 0, 1, 1); fbo.end();
However, to get it to actually to actually do that, I needed to explicitly load the identity matrices...
fbo.begin(OF_FBOMODE_NODEFAULTS); ofSetMatrixMode(OF_MATRIX_PROJECTION); ofPushMatrix(); ofLoadIdentityMatrix(); ofSetMatrixMode(OF_MATRIX_MODELVIEW); ofPushMatrix(); ofLoadIdentityMatrix(); ofClear(0, 255); ofSetColor(255); ofDrawRectangle(0, 0, 1, 1); ofSetMatrixMode(OF_MATRIX_PROJECTION); ofPopMatrix(); ofSetMatrixMode(OF_MATRIX_MODELVIEW); ofPopMatrix(); fbo.end();
The below code should create a view from [-1, -1] to [1, 1] and draw a square in the upper right quadrant...
However, to get it to actually to actually do that, I needed to explicitly load the identity matrices...