Search code examples
c++opengltexture-mapping

OpenGL: Disable texture colors?


Is it possible to disable texture colors, and use only white as the color? It would still read the texture, so i cant use glDisable(GL_TEXTURE_2D) because i want to render the alpha channels too.

All i can think of now is to make new texture where all color data is white, remaining alpha as it is.

I need to do this without shaders, so is this even possible?

Edit: to clarify: i want to use both textures: white and normal colors.

Edit: APPARENTLY THIS IS NOT POSSIBLE


Solution

  • What about changing all texture color (except alpha) to white after they are loaded and before they are utilized in OpenGL? If you have them as bitmaps in memory at some point, it should be easy and you won't need separate texture files.