Hello friends, i was trying to sovle the smooth graphics problem. I know i should use average normal for each vertex when drawing triangles. Who can kindly send me a demo program which demostrate this problem? Say, to draw a cube or pyramid, some simple model. Thanks a lot. pxiaobo@hotmail.com
Try one of the tutorials from nehe.gamedev.net, they are quite good and there is one tutorial (Lesson 3) which demonstrates how to colour using glShadeModel(GL_SMOOTH) as opposed to GL_FLAT, for goraud (who came up with the name for that? I can’t even spell it, let alone say it) shading.
Is what I think your after from your post.
Hope it helps.
Gouraud shading was invented by Henri Gouraud. Thats his paper:
Gouraud, H., “Continuous Shading of Curved Surfaces”, IEEE Transactions on Computers, C-20(6), pp. 623-629
If you are interested in the history of computer graphics:
Thanks. But that’s not what I want. This demo is just using diferent colors for each vertex. It has nothing to do with the normals. What I want is even using one color for a model you can still have the smooth effect on the edge.