1. Definition
Rasterization is the process by which a primitive is converted to a two-dimensional image. Each point of this image contains such information as color and depth. Thus, rasterizing a primitive consists of two parts. The first is to determine which squares of an integer grid in window coordinates are occupied by the primitive. The second is assigning a color and a depth value to each such square. The results of this process are passed on to the next stage of the GL (per-fragment operations), which uses the information to update the appropriate locations in the framebuffer. Figure 3.1 diagrams the rasterization process.
2. Rasterization with point
The rasterization of points is controlled with
void PointSize ( float size ) ;
size specifies the width or diameter of a point. The default value is 1.0. A value less than or equal to zero results in the errorINVALID_VALUE.
Point antialiasing is enabled or disabled by calling Enable or Disable with the symbolic constant POINT_SMOOTH. The default state is for point antialiasing to be disabled.
3. Rasterization with line segment
A line segment results from a line strip Begin / End object, a line loop, or a series of separate line segments. Line segment rasterization is controlled by several variables. Line width, which may be set by calling
void LineWidth ( float width );
Method 1: Digital Differential Analyzer (DDA)
Method 2: Bresenham line algorithm (Only support lines with both endpoints on integer points of pixel grid.)
Antialiasing: Wu‘s algorithm
4.
原文:http://www.cnblogs.com/mjust/p/5199486.html