Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Bug with alpha blending with lighting enabled and enabled GL_COLOR_MATERIAL: (1 Item)
   
Bug with alpha blending with lighting enabled and enabled GL_COLOR_MATERIAL  
Sample code:

glEnable(GL_LIGHTING);
/* Setup light source, etc. on GL_LIGHT1 */
glEnable(GL_LIGHT1);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glEnable(GL_BLEND);
glColor4f(1.0f, 1.0f, 1.0f, 0.5f);
glEnable(GL_COLOR_MATERIAL);

Then try to render any primitive, nothing have been produced. Result is just clear screen after glClear().

If glEnable(GL_COLOR_MATERIAL); line is commented out, all works according to standard.