I got the window drawing algorithm now, but now I need to add lines, sprites, etc.