Alpha problem with Light enabled
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement