Advertisement

Default Specular Color

Started by December 14, 2003 07:12 AM
0 comments, last by cippyboy 21 years, 2 months ago
I was trying some specular color... and because I never used it before(minus tests) I don`t really know what`s the default color... I guessed something like this->

//enable specular lighting

float specularColor[3] = {0.3f,0.3f,0.3f};
float Shine=10.0f;
glMaterialfv(GL_FRONT_AND_BACK,GL_SPECULAR, specularColor);
glMaterialfv(GL_FRONT_AND_BACK,GL_SHININESS, &Shine);
//render specular lighted objects

.................................
//disable specular lighting

float SpecularColor[3] = {0.0f,0.0f,0.0f};
glMaterialfv(GL_FRONT_AND_BACK,GL_SPECULAR,SpecularColor);
 
If I made any mistake or I`m wrong in any way please let me know. [edited by - cippyboy on December 14, 2003 8:20:33 AM] [edited by - cippyboy on December 14, 2003 8:23:41 AM]

Relative Games - My apps

The Red Book, appendix B - State variables. There''s a complete list of all default states (up to 1.1).

This topic is closed to new replies.

Advertisement