Planar (computer graphics)
|This article needs additional citations for verification. (February 2015)|
In computer graphics, planar is the method of representing pixel colours with several bitplanes of RAM. Each bit in a bitplane is related to one pixel on the screen. Unlike Chunky, Highcolour or Truecolour graphics, the whole data for an individual pixel isn't in one specific location in RAM, but spread across the bitplanes that make up the display.
This scheme originated in the early days of home computing, when cheaper memory chips could not supply data fast enough on their own to generate a picture on a TV screen or monitor. By splitting the data up into multiple planes, each plane could be stored on a separate memory chip. These chips could then be read in parallel at a slower rate, allowing graphical display on modest hardware. The CGA and EGA video adapters on early IBM PC computers used planar arrangement in colour graphical modes for this reason. When the later VGA was introduced, memory speeds had increased to the point where planar video modes were no longer a necessity, and aside from backwards-compatibility, using planar mode or not was left as a choice for the programmer.
For example, on a chunky display, each byte represents one pixel. Three pixels in a row would be stored as follows, where up to 256 different colours are available:
Whereas a planar data store could use 2 bitplanes, providing for a 4 colour display:
Adding a third plane would make 23=8 colours available. Where fewer than 256 colours are needed, planar graphics are more economical in RAM compared with chunky graphics, as there are no unused bits in a given byte.
A disadvantage of planar graphics is that more RAM address cycles are needed for scrolling and animations, although these operations can be made faster by dedicated hardware such as the blitter chips used in Amiga and some later Atari ST computers.