ofSetColor tints textures?

Whenever I call ofSetColor, it tints any textures that I draw afterwards. Is this supposed to happen?

yes that is the way it is meant to work.

so if you want to draw a texture normally call ofSetColor(0xFFFFFF); before you draw the texture/image/video etc

the reason we have this is:

  1. it is how openGL works which is what we are using to render. openGL is state based so the color it uses to draw is always the last color set and it stays that way till a new drawing color is set.

  2. it can be cool to draw a texture or image with a tint or alpha value as opposed to white and transparent.

:slight_smile:

I don’t know about OF specifically as I don’t use it yet, BUT whenever your for instance use glColor3f() in OpenGL to set a color it affects anything you draw afterwards.

So for instance to knock out the red channel in a texture you would use glColor3f( 0.0f, 1.0f, 1.0f );

Just set it back to glColor3f( 1.0f, 1.0f, 1.0f ); and your textures will draw fine.

Should’ve waited 2 mins :slight_smile: