pokitto / PokittoLib

Library for making programs on Pokitto hardware
22 stars 16 forks source link

The update rect and clip rect support for the Hi-Res mode, for C++ and Python #8

Closed haviital closed 6 years ago

haviital commented 6 years ago

The performance of full screen drawing in Hi-Res mode (220x176, 4 colors) is not enough for games. To optimize drawing to the screen buffer Display::setClipRect() method was added. That can be used e.g. to draw only the "dirty rect" area of the background bitmap to the screen buffer. Another important speed optimization is drawing only the update rect from the screen buffer to the LCD in the lcdRefreshMode1() and lcdRefreshMode1Spr() methods. Updating always the whole screen to LCD easily kills performance.

Changes: