ANTI-aliasing. i have the same QUESTION with cippyBoy

Started by
2 comments, last by kevinMan 21 years, 6 months ago
glHint(GL_SMOOTH_POLYGON_HINT,GL_NICEST); doesnt seem to work. MY VC 6.0++ doesnt compile this anti-aliasing technique method. AND the reason iam really here is that nehe''s tutorials only shows how anti-aliasing works on LINES AND ORTHO SCREEN. glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); this is Nehe''s method for lines. (2D) i need 3D polygons. ive checked some websites. and ive turned to this. CAN ANYONE HELP? at least some clue. dont want to end up buying a book or going to a book shop
Advertisement
First of all, the token is not GL_SMOOTH_POLYGON_HINT it is GL_POLYGON_SMOOTH_HINT

Though, if you''ve read the topic from cippyboy, you would see that I don''t recommend polygon smoothing at all. Polygon smoothing looks crap (except for individual triangles), it has blending limitations and it is not accelerated in hardware.

NeHe uses line smoothing because the result looks very good, and it is hardware accelerated. You may use point smoothing as well. Both points and lines are good primitives to smooth because they are (almost) not connected. The problem with triangles (or any filled polygon) resides in the junction between them : junction is where it REALLY look crap. Though, if you have only individual triangles it may not look crap at all, but it''s generally a rare case. It depends on your application.

2D is just a special case of 3D. There is no additional instruction to call for line smoothing or polygon smoothing in 3D. It is just a coincidence if NeHe''s tutorials used line smoothing only in 2D.

As for documentation, you may at the very least download OpenGL specifications at www.opengl.org (for free) and you can also find online the Reb Book which is IMO the best book for learning OpenGL.
The value you passed to glHint() method will return results up to your imprementation of OpenGL. The implementation possibly choose to ignore this particular hint.
Doday''s graphics cards support full scene antialiasing (FSAA) done entirely in hardware. In OpenGL it is supported via extension, namely WGL_ARB_multisample. To utilize the functionality of FSAA you have to set a suitable pixel format for device context of your rendering window. That is a pixel format with additional buffer called sample buffer. Because that kind of buffer is not supported by Windows there is another extension WGL_ARB_pixel_format providing a mechanism to select pixel formal with sample buffer. If your graphics card supports both extensions you may utilize FSAA in your application. Well I had problems with it, though. Although my GeForce 2MX supports both extensions I was unable to find a suitable pixel format with a sample buffer. When I downloaded the latest driver from NVidia I discovered that it doesn''t support WGL_ARB_multisample extension at all. But as far as I know GeForce 2 cards support FSAA so I don''t know where the problem is. Maybe you will have more luck.

This topic is closed to new replies.

Advertisement