applying different materials to front and back

GL_COLOR_MATERIAL is turned off…

I am having problems with applying different materials to front and back… if I only apply it to front… it goes ahead and applies it to the back… if I comment out the front part… it applies black to both front and back… any Ideas? is this even possible?

It should work as desired with separate glMaterial calls for GL_FRONT and GL_BACK targets.
Quick check: Do you have two sided lighting enabled?

Originally posted by Relic:
It should work as desired with separate glMaterial calls for GL_FRONT and GL_BACK targets.
Quick check: Do you have two sided lighting enabled?

That must be it , I didn’t know I had to do that… lemme look it up in MSDN…

ahh here we go… after a couple of mins of searching I found this: GL_LIGHT_MODEL_TWO_SIDE

but not much was said for the second parameter, what should I put in there? They said “params is 0 (or 0.0), one-sided lighting is specified, and only the front material parameters are used in the lighting equation.” but neglected to say about double sided value, oh well I guessed and put a 1.0 in there…

glLightModelf(GL_LIGHT_MODEL_TWO_SIDE,1.0);

Thanks a lot again Relic! You couldn’t have made it made it more exact