Mike Gorchak
|
Bug with alpha blending with lighting enabled and enabled GL_COLOR_MATERIAL
|
Mike Gorchak
06/09/2009 8:42 AM
post31192
|
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.
|
|
|