|
GL_POLYGON_SMOOTH
After many days of struggling with this, I''m trying to find
a demo w/ source that uses GL_POLYGON_SMOOTH. Nehe got one?
I want to draw a simple object (box, sphere, etc.) that is
blended with the background.
Nothing is working, red book, etc.. no help. I''ve read and
seen nearly everything except the right solution.
Here''s my setup. I just need poly smoothing, but I try to
enable every damn smoothing function I can think of as a last
desperate resort to get something working. But nada.
I think that you missunderstand something about GL_POLYGON_SMOOTH. It is interpolating between the vertices on the same polygon not between different polygons. From the glShadeModel man page:
GL primitives can have either flat or smooth shading. Smooth shading, the default, causes the computed colors of ver
tices to be interpolated as the primitive is rasterized, typically assigning different colors to each resulting pixel
fragment. Flat shading selects the computed color of just one vertex and assigns it to all the pixel fragments gener
ated by rasterizing a single primitive. In either case, the computed color of a vertex is the result of lighting if
lighting is enabled, or it is the current color at the time the vertex was specified if lighting is disabled.
Compare with some of the first NeHe tutorials. You want to blend different polygons and if I remember right is that covered in lesson 8.
GL primitives can have either flat or smooth shading. Smooth shading, the default, causes the computed colors of ver
tices to be interpolated as the primitive is rasterized, typically assigning different colors to each resulting pixel
fragment. Flat shading selects the computed color of just one vertex and assigns it to all the pixel fragments gener
ated by rasterizing a single primitive. In either case, the computed color of a vertex is the result of lighting if
lighting is enabled, or it is the current color at the time the vertex was specified if lighting is disabled.
Compare with some of the first NeHe tutorials. You want to blend different polygons and if I remember right is that covered in lesson 8.
Hi,
On My site, you''l find a example who use AA.
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
On My site, you''l find a example who use AA.
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Leyder Dylan:
Do you have an example that uses AA polygons?
Your example only uses AA lines.
Obelix:
So, you're saying that GL_POLYGON_SMOOTH is not used for
full-screen AA?
Then how do I get full-screen AA in OpenGL?
All I really want is the object's edges to blend into the
background. Without AA, I'm getting a crappy pixelated
cookie-cutter effect on my object.
Edited by - jtech on December 26, 2001 12:47:48 PM
Do you have an example that uses AA polygons?
Your example only uses AA lines.
Obelix:
So, you're saying that GL_POLYGON_SMOOTH is not used for
full-screen AA?
Then how do I get full-screen AA in OpenGL?
All I really want is the object's edges to blend into the
background. Without AA, I'm getting a crappy pixelated
cookie-cutter effect on my object.
Edited by - jtech on December 26, 2001 12:47:48 PM
My previous post was about glShadeModel but for some reason did I wrote GL_POLYGON_SMOOTH instead of GL_SMOOTH. I guess I was reading too fast.
The glShadeModel call in your code example is not needed anyway.
Your color buffer must store alpha values for polygon antialiasing so make sure that you have GLUT_ALPHA if you are using GLUT. I suspect that the color depth can also affect the result. I tried the aapoly.c example from the old red book and I had to add
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
to see any changes.
This is not full-screen AA (FSAA). In the red book do they talk about FSAA and the accumulation buffer but the accumulation buffer do not have hardware support on consumer cards. With the recent multisample extension can you do it if you have a fast card:
http://developer.nvidia.com/view.asp?IO=ogl_multisample

Your color buffer must store alpha values for polygon antialiasing so make sure that you have GLUT_ALPHA if you are using GLUT. I suspect that the color depth can also affect the result. I tried the aapoly.c example from the old red book and I had to add
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
to see any changes.
This is not full-screen AA (FSAA). In the red book do they talk about FSAA and the accumulation buffer but the accumulation buffer do not have hardware support on consumer cards. With the recent multisample extension can you do it if you have a fast card:
http://developer.nvidia.com/view.asp?IO=ogl_multisample
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement