Get current blendmode

Hi,
may be this is trivial but I can’t figure it out. I want to set a specific blendmode to draw a few things and then go back to the previous one, whatever it was.

Is there a way to get the current blendmode, to be able then to set it back? Renderers have a setBlendMode() method but not a get.

thanks,
Davide

may be too late for your project:
const ofBlendMode mode = ofGetCurrentRenderer()->getStyle().blendingMode;

since this belongs to Style(), you can just push the style

				ofPushStyle(); 
				{
					//const ofBlendMode mode = ofGetCurrentRenderer()->getStyle().blendingMode;
					ofEnableBlendMode(OF_BLENDMODE_DISABLED);
					_mesh.draw();
					//ofEnableBlendMode(mode);
				}
				ofPopStyle();

the previous style will then be restored after ofPopStyle()

1 Like