I have a strange problem and I kind of understand why this happens, but I wonder if it is possible to solve this. I’m mostly working in 3d environment with lights turned on and I’ve integrated ofxUI to my application. I use this code in my setup function to load png logo and some text:
img = new ofImage(); img->loadImage("logo.png"); gui = new ofxUICanvas(10, 10, length+xInit, ofGetHeight()); gui->addWidgetDown(new ofxUIImage(img->width*.6, img->height*.6, img, "3D Environments")); gui->setDrawBack(true);
If I enable light in setup function, my logo and text get darker. If i do not enable it, it’s all right. You can see it in the picture.
The thing is that if I enable light anywhere in the draw function, the same thing happens. As I understand, ofxUI starts drawing it’s contents from setup function itself and I can’t seem to be able to find a way to catch it’s contents. I guess I would like to do something like this in the draw function:
glDisable(GL_LIGHTING); ofxUI.draw(); glEnable(GL_LIGHTING);
If I do this in setup function it doesn’t work, last parameter is simply taken to be the real one and that’s it.