Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: I can't get GL_SMOOTH to work

  1. #1
    Guest

    I can't get GL_SMOOTH to work

    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.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: I can't get GL_SMOOTH to work

    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...

    Regards.

    Eric

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: I can't get GL_SMOOTH to work

    Hello

    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...

    Bob

  4. #4
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    122

    Re: I can't get GL_SMOOTH to work

    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.

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: I can't get GL_SMOOTH to work

    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.

    Bob

  6. #6
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    122

    Re: I can't get GL_SMOOTH to work

    Ok, ok ...

  7. #7
    Guest

    Re: I can't get GL_SMOOTH to work

    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 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •