Fenris
2003.10.26, 07:12 PM
I'm trying to set the glMaterial (GL_FRONT, GL_SHININESS, matShine); in an application. It works on my ATi card, but not on the Nvidia. I set up the app with this:
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_ambient[] = {0, 0, 0, 1};
GLfloat mat_shininess[] = { 20 };
GLfloat light_position[] = { 0.0, 1.0, 1.0, 0.0 };
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
I know that the call with GL_AMBIENT works out fine, and all of this is copy-pasted out of the Red Book. The GL context gets the makeCurrentContext message just before this block, and as I said, this works on an iBook with a Radeon. My GF2MX just ignores the shininess value.
Is there anything I need to do (a glEnable call, perhaps) or something? I guess that this is all due to the ATi driver being more forgiving than the Nvidia one, but... I can't get it to work, damnit! :-/
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_ambient[] = {0, 0, 0, 1};
GLfloat mat_shininess[] = { 20 };
GLfloat light_position[] = { 0.0, 1.0, 1.0, 0.0 };
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
I know that the call with GL_AMBIENT works out fine, and all of this is copy-pasted out of the Red Book. The GL context gets the makeCurrentContext message just before this block, and as I said, this works on an iBook with a Radeon. My GF2MX just ignores the shininess value.
Is there anything I need to do (a glEnable call, perhaps) or something? I guess that this is all due to the ATi driver being more forgiving than the Nvidia one, but... I can't get it to work, damnit! :-/