# Bitmaps and Screens

## Creating Off-Screen Bitmaps

Q: I want to create off-screen bitmaps and render cels into them using `DrawCels()`. I want bitmaps ranging in size from a few pixels to about 200 x 100 pixels.

A: Use `CreateBitMap()` and specify the `TagArg` elements that deal with bitmap height and width.

## Using Multiple Screens

Q: I am trying to create a screen with four bitmaps using `CreateScreenGroup()`. I set the `CSG_TAG_BITMAPCOUNT` to 4 but I always get an error on the `CreateScreenGroup()` call.

A: You probably want multiple screens. A screen is a logical unit that fills the display. A screen is either active or not, and you can only display one screen on the TV at a time.

A bitmap is a block of VRAM that is part of a screen. A screen can have multiple bitmaps, but usually has just one 320-x-240 bitmap. Each bitmap can have its own width and height. You don't need to specify width (it defaults to the width of the display, 320), but if you ask for a screen with more than one bitmap, you must specify the height of each one. It does not just default to `DisplayHeight`/`NumBitmaps`.

When you use a `CSG_TAG_BITMAPCOUNT` for anything other than 1, you must also supply a `CSG_TAG_BITMAPHEIGHT_ARRAY` value, which is a pointer to an array of `int32` numbers, each one the height of one of the bitmaps.

When you use double buffering, you have two screens of one bitmap each. It sounds as if that's basically what you're doing, so set `CSG_TAG_SCREENCOUNT` to 4 to get four buffers.

## Bitmap Item Value

Q: How can I get the value of a bitmap item?

A: To get the value of a bitmap item, use:

``

    screen = (Screen *)LookupItem( ScreenItem );
    BitmapItem = screen->scr_TempBitmap->bm.n_Item;

Note that `ScreenItem` is returned by `CreateScreenGroup()`.

## Color Cycling

Q: Can I use color cycling in 256-color, 8-bit mode on an entire background image of 320-x-240 pixels? I need to cycle at 60 Hz for my special effects to work best. I also don't want to draw the background over and over.

A: It has never been possible to do color cycling in 8-bit, 256-colors with our hardware the way other systems do it. It is possible to achieve color cycling effects with `SubmitVDL()` and `DisplayScreen()` calls. However, the 3DO hardware color tables are unusual: there are three separate color tables (CLUTs), one for each gun, not just one color table, as you find when working with computer displays.

It is possible to achieve effects similar to other systems palette effects by rerendering graphics on the screen and modifying the PLUTs (pixel lookup tables) associated with them.

As long as the cel is no bigger than 320 x 240, is drawn at 1:1, and is opaque-no translucency and no holes-redrawing the background works well. It will draw fast: 60Hz or better.