how do i get materials working

Started by
3 comments, last by choffstein 18 years, 4 months ago
I have these commands before I draw my triangles glDisable(GL_TEXTURE_2D); glMaterialfv(GL_FRONT,GL_AMBIENT,mpMaterials[matIndex].mAmbient); glMaterialfv(GL_FRONT,GL_DIFFUSE,mpMaterials[matIndex].mDiffuse); glMaterialfv(GL_FRONT,GL_SPECULAR,mpMaterials[matIndex].mSpecular); glMaterialfv(GL_FRONT,GL_EMISSION,mpMaterials[matIndex].mEmissive); glMaterialf(GL_FRONT,GL_SHININESS,mpMaterials[matIndex].mShininess); but for some reasnon my object is always pure white. I double checked the values in the variables, and yes there are valid values, so what am i missing. Is there something I need to glEnable ? Thanks
Advertisement
do you have lighting enabled?
no, its turned off, does it need to be on?
Yes, lighting must be enabled. If you don't want lighting, just use glColor [smile]
This saves some confusion.

This topic is closed to new replies.

Advertisement