How to Get size about Matrix stack (ofPushmatrix, ofPopmatrix)


#1

Hi I’m trying to get data about matrix stack size but I don’t know
how to get data matrix stack size

this is sample code
this is for check stack and delete stack

I want to run this code
thank you

void ofApp::draw(){
    ofPushMatrix();
    ofSetColor(0,255,255);
    ofFill();
    ofTranslate(ofGetMouseX(),ofGetMouseY());
    ofRect(0, 0, 30, 30);
    //cout << ofGetCurrentNormalMatrix() << endl;
    //cout << "ofGetCurrentViewMatrix()" << endl;
    //cout << glGetFloati_v << endl;
    ofPopMatrix();
    if(Matrix Stack size > 0){
        ofPopMatrix();
    }
}