Vertex color with texture mapping

Hi!

(My question is a library-related question, but I believe it can be solved with pure OGL knowledge.)

I am currently working on a project involving ARToolkit (a free augmented reality library. Quite cool). My goal this semester is to explore how a GUI can be implemented in an AR environment, and how effective it is.

My problem occure when a GL context is set up by ARToolkit (not when using pure SDL/GLUT etc). It seems that the possibility to set texturecolor using glColor() is ignored. If texturemapping is disabled, the quad is colorized just fine. This is quite annoying, because now every letter in my texturemapped font must be white etc. (My fontclass works just fine when using SDL).

So, is there a statechange I must do to re-enable colorizing of textures? (I believe that this must be a pure OGL thing, but I havent manage to come up with a solution).

Anyone?

Thanks in advance

  • Øystein Handegard, NTNU

[This message has been edited by Handegar (edited 11-04-2002).]

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

Y.

Once you turn on lighting, you also want to use glColorMaterial().