As OLD OGLman said specular lights dont apply to textures directly…
But this is a way around this…
First you have to draw your scene without texture to get the specular highlight and another time to get the final result… Then you blend them… All of these sounds like a huge overhead…
So, you could have something like this…
glLightModelxx( GL_LIGHT_MODEL_AMBIENT, color );
glLightxx( GL_LIGHT0, GL_DIFFUSE, color );
glLightxx( GL_LIGHT0, GL_SPECULAR, color );
glLightxx( GL_LIGHT0, GL_POSITION, position );
glMaterialxx( GL_FRONT, GL_AMBIENT, color );
glMaterialxx( GL_FRONT, GL_DIFFUSE, color );
glMaterialxx( GL_FRONT, GL_SPECULAR, color );
glMaterialxx( GL_FRONT, GL_SHINENESS, 128 );
glColorxx( color );
//your polygons…
glRectangle(); // I dont know, something.
glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_XD);
glLightxx( GL_LIGHT0, GL_AMBIENT, normal );
glLightxx( GL_LIGHT0, GL_DIFFUSE, normal );
glLightxx( GL_LIGHT0, GL_SPECULAR, color );
glMaterialxx( GL_FRONT, GL_AMBIENT, normal );
glMaterialxx( GL_FRONT, GL_DIFFUSE, normal );
glMaterialxx( GL_FRONT, GL_SPECULAR, color );
glMaterialxx( GL_FRONT, GL_SHINENESS, 0 );
//You polygons again…
glRectangle();
I hope this helps… I am not saying this is optimal either. But it is an idea.
