next up previous contents
Next: 4.7 Distortion Correction Up: 4 Geometry and Transformations Previous: 4.5 Moving the Current   Contents

4.6 Preventing Clipping of Wide Lines and Points

It is important to note that OpenGL points are clipped if their projected position is beyond the viewport. If a point size other than 1 is specified with glPointSize(), the object will appear to ``pop'' out of view when the center of the wide point exits the viewport. This is because the point itself has no area, and as such is clipped based solely on its position. An example scenario is shown in Figure 21.

Wide lines have the same problem. The line is clipped to the viewport, and thus some pixels contributed by the original line are no longer drawn, as shown in Figure 21.

This problem is more significant in a multiple-display setting, such as a three-monitor flight simulator, or in a multiple-viewport setting such as a cylindrical projection.


% latex2html id marker 2750
\fbox{\begin{tabular}{c}
\vrule width 0pt height 0.1...
...ure \thefigure . Clipped Wide Primitives Can Still be Visible}\\
\end{tabular}}

These missing pixels can be restored by setting the scissor region to the visible area and then enlarging the viewport so that points and lines are clipped beyond the region in which they could contribute pixels. For $n$-pixel wide points and lines, this margin is $n-1$ pixels. The viewing frustum has to be enlarged based on the new viewport so that points are rasterized to the same pixels within the larger viewport and scissor region as they were in the smaller viewport.


next up previous contents
Next: 4.7 Distortion Correction Up: 4 Geometry and Transformations Previous: 4.5 Moving the Current   Contents
2001-01-10