Windowed vs. Full Screen Programs

DirectDraw programs can be either windowed or full screen. Windowed DirectDraw programs look like traditional Windows programs but use DirectDraw for blitting and video memory management. Full screen DirectDraw programs behave more like conventional DOS programs because they establish a video mode, but they retain the benefits of the Windows environment.

For windowed applications, DirectDraw offers minimal advantages. Performance is only marginally better on most video cards and often is actually slower than using Fastgraph's native libraries. More importantly, most DirectDraw video drivers cannot blit a surface whose color depth is different from that of the user's display driver. This means you'll have to determine the display driver's color depth with fg_colors() and make sure your virtual buffers all use that same color depth. For these reasons, we recommend not using DirectDraw for windowed applications.

DirectDraw's full screen mode, on the other hand, offers significant benefits. Blitting a 256-color buffer to a high color or true color display, or blitting a direct color buffer to a palette-based display, can be quite sluggish. When performance is an issue, the traditional way around this problem is checking the display driver's color depth with fg_colors(). If it is not the same color depth as your drawing surfaces, the program might display a message box suggesting the user change display settings. Because full screen DirectDraw programs establish their own screen resolution and color depth, you can effectively change the color depth of the user's display "on the fly" to match that of your program's drawing surfaces.

<< Prev

Next >>

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.