void ofMatrixStack::popMatrix(){
	if (currentMatrixMode == OF_MATRIX_MODELVIEW && !modelViewMatrixStack.empty()){
		modelViewMatrix = modelViewMatrixStack.top();
		modelViewMatrixStack.pop();
	} else if (currentMatrixMode == OF_MATRIX_PROJECTION && !projectionMatrixStack.empty()){
		projectionMatrix = projectionMatrixStack.top();
		projectionMatrixStack.pop();
	} else if (currentMatrixMode == OF_MATRIX_TEXTURE && !textureMatrixStack.empty()){
		textureMatrix = textureMatrixStack.top();
		textureMatrixStack.pop();
	} else {
		ofLogWarning("ofMatrixStack") << "popMatrix(): empty matrix stack, cannot pop any further";
	}
	updatedRelatedMatrices();
}
void ofMatrixStack::multMatrix (const glm::mat4 & m){
	*currentMatrix = *currentMatrix * m;
	updatedRelatedMatrices();
}
void ofMatrixStack::loadMatrix (const glm::mat4 & m){
	*currentMatrix = glm::mat4(m);
	updatedRelatedMatrices();
}
void ofMatrixStack::loadIdentityMatrix (void){
	*currentMatrix = glm::mat4(1.0);
	updatedRelatedMatrices();
}
void ofMatrixStack::rotateRad(float radians, float vecX, float vecY, float vecZ){
	*currentMatrix = glm::rotate(*currentMatrix, radians, glm::vec3(vecX, vecY, vecZ));
	updatedRelatedMatrices();
}
void ofMatrixStack::scale(float xAmnt, float yAmnt, float zAmnt){
	*currentMatrix = glm::scale(*currentMatrix, glm::vec3(xAmnt, yAmnt, zAmnt));
	updatedRelatedMatrices();
}
void ofMatrixStack::translate(float x, float y, float z){
	*currentMatrix = glm::translate(*currentMatrix, glm::vec3(x, y, z));
	updatedRelatedMatrices();
}
void ofMatrixStack::multMatrix (const float * m){
	currentMatrix->preMult(m);
	updatedRelatedMatrices();
}
void ofMatrixStack::loadMatrix (const float * m){
	currentMatrix->set(m);
	updatedRelatedMatrices();
}
void ofMatrixStack::loadIdentityMatrix (void){
	currentMatrix->makeIdentityMatrix();
	updatedRelatedMatrices();
}
void ofMatrixStack::rotate(float degrees, float vecX, float vecY, float vecZ){
	currentMatrix->glRotate(degrees, vecX, vecY, vecZ);
	updatedRelatedMatrices();
}
void ofMatrixStack::scale(float xAmnt, float yAmnt, float zAmnt){
	currentMatrix->glScale(xAmnt, yAmnt, zAmnt);
	updatedRelatedMatrices();
}
void ofMatrixStack::translate(float x, float y, float z){
	currentMatrix->glTranslate(x, y, z);
	updatedRelatedMatrices();
}