PDA

View Full Version : Is possible to have specular effect in real time?



10-16-2002, 04:09 AM
Is possible to have specular effect in real time?

jmg
10-16-2002, 07:05 AM
Yes.

//...
GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 };
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
//...
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
//...
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);

See chapter 5 http://ask.ii.uib.no/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG/