It is very useful to ensure no garbage is seen whilst loading in new images, or you wish to clear the entire framebuffer. It should be called (once) in your video mode setup stage.
Code: Select all
void clearVRAM()
{
RECT rectTL;
setRECT(&rectTL, 0, 0, 1024, 512);
ClearImage2(&rectTL, 0, 0, 0);
DrawSync(0);
printf("VRAM cleared!\n");
}