Drawing ofimages on top of opengl?

When I attempt to draw some ofImages (or textures using getTextureReference) as a hud on top of 3d graphics, the ofimages appear as all black rectangles. If I comment out the opengl 3d code the images appear fine. I’ve tried clearing the depth buffer bit and making sure that lighting is disabled for the ofImages to be drawn, but that doesn’t work- is there something else I’m forgetting to get this to work?

I don’t know if this is your issue, but one simple thing is that when you draw an image, it gets tinted by the draw color, so if your draw color, ie:

  
ofSetColor(0,0,0);   

is black, when you draw an image it will be tinted black. best is to set the draw color to be white before drawing an image:

  
ofSetColor(255,255,255);  
myImage.draw(....);  

if it’s not that, maybe you can post up some example that shows the problem?

take care!
zach

1 Like