While using fixed functioning pipeline in lighting, how to specify which model to use, phong or gouraud like in glsl, we can have fragment shader to calculate light values in phong while we compute light values in vertex shader in gouraud?
There’s no phong lighting support in fixed-function. Vertex lighting only (ala gouraud). Or you can do glShadeModel( GL_FLAT ) to force flat shading.
The fixed-function pipeline doesn’t support Phong shading (interpolating the vertex normals and performing the dot-products per fragment), which is presumably what was meant (given the reference to “Gouraud”, which is the other common shading method).
The term “Phong lighting model” (where “lighting” may alternatively be “reflection” or “illumination”) refers to the overall lighting model which is the basis of the lighting model used by the fixed-function pipeline. Wikipedia article.
Thanks for the correction. I recall hearing that now, but forgot when typing.