Cauliflower is nothing but cabbage with a college education - Mark Twain Concept 2.1 : Antialiasing - Introduction ========================================= Idea: ===== To your left you should see a simple red wireframe cube. If you had not noticed it before, it should be clear now, that in most of our OpenGL pictures that had lines, especially nearly horizontal or nearly vertical, the lines appeared jagged. These jaggedness is because the line is approximated by a series of pixels that must lie on the pixel grid. Removing this jaggedness is called antialiasing. When performing antialiasing, OpenGL calculates a coverage value for each fragment based on the fraction pixel square on the screen that it would cover. In RGBA mode, OpenGL multiplies the fragments coverage value by its alpha value. The glHint() command ==================== Antialiasing costs speed!. the glHint() command is used to exercise some control over the trade-off between image quality and speed. glHint(GLenum target, GLenum hint) controls certain aspects of OpenGL behavior. The target parameter indicates which behavior is to be controlled. The hint parameter can be set to: GL_FASTEST - to indicate the most efficient option be chosen GL_NICEST - to indicate the highest quality option GL_DONT_CARE - to indicate no preference. Possible target values and their meanings are provided in the table below. -------------------------------------------------------- Parameter Meaning -------------------------------------------------------- GL_POINT_SMOOTH_HINT Specify the desired GL_LINE_SMOOTH_HINT sampling quality of GL_POLYGON_SMOOTH_HINT points, lines or polygons during any antialiasing operations. GL_FOG_HINT Specifies whether fog calculaitons are done per pixel (GL_NICEST) or per vertex (GL_FASTEST) GL_PERSPECTIVE_CORRECTION_HINT Specifies the desired quality of color and texture-coordinate interpolation ==========================================================