UI disappearing behind fog

Hi ,

I am using ofxFog and ofxUI.
I have been able to make a simple slider, and link it to the fog intensity. Everything works fine. The problem is that the UI tends to disappear behind the fog … which is not really practical … ^^

Is there a way for OF to draw things onto different “canvas”, ie some 3d objects on one canvas, and the UI on top of everything else ?

Are you sure you are calling fog.disable();?

But if I call fog.disable(); … I won’t have a fog anymore, will I ?

the flow should be this…

fog,enable()
// draw stuff with fog
fog,disable()
// anything drawn now won’t have fog applied (i.e. the ui)

it works perfectly
thanks a bunch ^^

Glad this solution works for you. If you ever need to draw things in a “different canvas” and then apply them to your screen, you should probably use ofFbo http://www.openframeworks.cc/documentation/gl/ofFbo.html

I’ve not worked with ofxFog (sounds ace), but wouldn’t ofEnableDepthTest() and ofDisableDepthTest() work here?