Registriert: Mo Sep 23, 2002 19:27 Beiträge: 5812
Programmiersprache: C++
After using glColorMaterial you may have to reset the ambient and diffuse parts of the lighting, as they are influenced by GL_COLOR_MATERIAL (I guess they're both set to 1/1/1, which would explain why it seems there is no more lighing).
So this should work :
Code:
const
LightAmbient :array[0..3]ofSingle=(0.3,0.3,0.3,1);// Change to what you need
LightDiffuse :array[0..3]ofSingle=(0.6,0.6,0.6,1);// Change to what you need
Registriert: Fr Aug 13, 2004 17:43 Beiträge: 60 Wohnort: Belgien
I've found another solution were there is no difference between using GL_COLOR_MATERIAL and not using GL_COLOR_MATERIAL. You should reset all material parameters with glMaterialfv to their default values or to your initial values.
Mitglieder in diesem Forum: 0 Mitglieder und 11 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.