View Full Version : I can't get GL_SMOOTH to work

03-01-2000, 07:24 AM
I just can't seem to get smooth rendering to work. I am working on Windows NT with Voodoo 3 card with latest drivers installed. I have tried different lighting models, materials etc, but all my polygons look flat. Single colour from edge to edge.

I'd appreciate some ideas please.

03-01-2000, 07:51 AM
Just in case this is a driver issue, you should build a little program which does not use lighting/material but only smooth polygons.

For example, try to draw a triangle with one vertex red, another green and the last one blue. If you do not have a shaded triangle, then it is a driver issue... Before contacting the vendor, post your code for the test here !

You can have a look in the developper section of this site to find glut examples using GL_SMOOTH. If they work, it means that your program is bugged...



03-01-2000, 08:52 AM

If you are using lighning, the problemt might be that you don't set normals for each vertex, then the whole polygon will look like it's flatshaded, even if you set GL_SMOOTH.

Just a possibility...


03-01-2000, 10:20 PM
Bob, thats not quite right. If your lightsource is near one vertex, approximatly in the direction of the normal-vector, that vertex becomes lighter while the other vertices remain dark whith a gradient in the polygon.

03-02-2000, 03:11 AM
Ok, maybe you are right about this Marc. What I ment in my post was that PhilD might have the lightsource furhter away (relative to the size), and the polygon looks like it's flatshaded.


03-02-2000, 04:03 AM
Ok, ok ... http://www.opengl.org/discussion_boards/ubb/wink.gif

03-03-2000, 12:32 AM
Thanks for your help guys, you've given me some ideas to try. In the meantime, have a look at www.aicom.co.uk/products/volumaid.htm (http://www.aicom.co.uk/products/volumaid.htm) and you'll see what I mean. I think I'm setting the normals OK because the polygons seem to change shade properly according to their direction relative to the light source. But what I was expecting was a rounded edges effect. Perhaps the light source is too far away, perhaps I should use spotlight effects. I'll try different coloured adjacent polygons too.