Advertisement

Alpha problem with Light enabled

Started by October 30, 2001 05:39 PM
1 comment, last by willyx 23 years, 3 months ago
if i use this before apply the texture glColor4f(1.0f,1.0f,1.0f,0.5f); I''ve the texture with 50% solid. But if i enable glEnable(GL_LIGHTING); the texture is 100% solid. Lights works and the alpha channel of the texture is well used, but not modify from the glColor4f. How i can solve this problem?
Hello Willyx,

yeah, if you use lighting the color is ignored, but the material color is used. Use glMaterial* to change the color when using lighting.
Alternative you can call glEnable(GL_COLOR_MATERIAL) and everytime you call glColor* the material will be changed too. Try it out. Use glColorMaterial to customize the behavior when GL_COLOR_MATERIAL is enabled.

Hope it helps
Ben

Advertisement
Thanks,thanks,thanks!
Yes now works fine...i''ll put your name in the greetings of my final exam (i''m doing a game in openGL for that)

This topic is closed to new replies.

Advertisement