Home | Lehre | Videos | Texte | Vorträge | Software | Person | Impressum, Datenschutzerklärung | Blog RSS

Hidden Surface Elimination, Visible Surface Determination

A surface in the background that is occluded by a surface in the foreground must not be visible in the rendering. So it has to be eliminated. Most often, this is done in an indirect manner. Here are some typical methods to solve the problem:

Screen Flicker, Double Buffering

If we clear the screen and then draw everything again, we generate screen flicker. How can this be avoided? In full-screen mode, no time-consuming copy ("blit": bit block transfer) is needed for double-buffering; one can simply switch to a different position in memory.

If the copying or switching is not sychronized to the display, "tearing" will result.

Double-buffering is activated in Java Swing and Direct3D by default. In Windows Forms it may be activated, too:
.NET 1.1:
SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
.NET 2.0:
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);