Smooth in open GL

Started by
4 comments, last by dragon376 22 years, 10 months ago
I am trying to have a "smooth" effect on a object created polygon by polygon. I have glShadeModel(GL_SMOOTH) but it seems that I need to do something else to have a smooth looking surface. NEED HELP Thanks Phil.
Advertisement
What do you mean by smooth?
Perhaps normals averaging or texture filtering?
You need to get the normals for every surface before OpenGL can take the polys and make them smooth.

------------------------------
Trent (ShiningKnight)
E-mail me
ShiningKnight Games (I had to make one up, to fit in with the rest of you )
Project: Writing tutorials and code for my OpenGL Game Programming series
OpenGL Game Programming Tutorials
If you get 1 normal per surface on your mesh you''ll get a flat shading which isn''t exactly "smooth". If you get 1 normal per vertex on your mesh OpenGL will gouraud shade it making the mesh look all pretty and "smooth".
GL_SMOOTH = Gouraud shading.

It''s up to you to give the code the good value to get the desired effect.

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
If you use polygon normals, to calculate vertex normals loop through all vertices and calc the average normal vector for all polys the vertex is used in.
-------------------------------------------------------------LGPL 3D engine - http://www.sourceforge.net/projects/realityengine

This topic is closed to new replies.

Advertisement