OAP Lizzard A game interface engine
Game interfaces, outside the game Settings
← The journal
event Painting · Drawing the picture Decision

Painting moves to the graphics card, software kept on a switch

Dragging things around in Edit Mode was sluggish. Lizzard was repainting the whole picture from scratch, in software, every time anything changed.

Read the entry: Painting moves to the graphics card, software kept on a switch

I called the first suggestions sticking plasters, not the wound. Repainting only the part that changed I ruled out as a nightmare to get right without screen corruption. A test settled where the time went: even with the picture never sent to the screen, painting still took about 35 milliseconds.

So the painting moved to the graphics card. That brought it down, but most of what remained was copying the picture back from the card. Letting the card show the picture itself cut the drawing thread's time to 0.9 milliseconds a picture.

We kept the software painter as a reference: a test draws the same scenes both ways and fails if they drift apart. Not checked at the time: whether the mouse still reached the game through the card's surface.