how do i get materials working
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement