SaturnRingLibrary 0.9.1
SGL wrapper
 
Loading...
Searching...
No Matches

◆ LoadBitmap()

static void SRL::VDP2::BmpScreen< RBG0, Id, On >::LoadBitmap ( SRL::Bitmap::IBitmap * bmp)
inlinestaticinherited

Loads a bitmap into VRAM and registers it for display on the ScrollScreen.

The maximum supported loading size is 2 VRAM banks (262,144 bytes). Furthermore, VDP2 Bitmaps can only be stored in VRAM with one of 4 container sizes: 512x256, 512x512, 1024x256, or 1024x512. These factors place the following bounds on the maximum size and VRAM requirements of a bitmap scroll:

Bitdepth Max Image Size VRAM Usage
4bpp 1024x512 1/2, 1, or 2 banks
8bpp 512x512 or 1024x256 1 or 2 banks
16bpp 512x256 Always 2 banks
Parameters
bmpPointer to the bitmap interface to load from.
Note
If source Bitmap size is not equal to one of the container sizes, excess VRAM will be wasted. To conserve VRAM, consider converting to tilemap format with Bmp2Tile for smaller images when possible.
RBG0 only supports the 512x256 and 512x512 containers. Because RBG0 does not need to reserve an extra bank for map data in this mode, this is one case where using the bitmap format may save VRAM resources over tilemaps.