I''m programming a tetris-style game using Window''s GDI. Every time I draw a rectangle it stays on the screen when I draw the next one, so I would leave a trail of rectangles whenever I moved the block. To solve this, I drew a big black rectangle the size of the screen to clear it before drawing the next frame, but I was wondering if there was a faster way to clear the screen, or perhaps a function that I could use? Thanks
Clearing the Screen
Started by pizza box, Dec 13 2001 01:02 PM
9 replies to this topic
Sponsor:
#4 Members - Reputation: 168
Posted 13 December 2001 - 01:16 PM
Thats what Ive been doing, but the box I draw is the entire screen so it clears out everything. The problem is that I can see the blocks flickering, so it is kind of slow. I was wondering if there are any built-in functions to solve this.
#5 Members - Reputation: 122
Posted 13 December 2001 - 01:20 PM
You dont have to draw a black box over the entire screen. Just a black one on same place and same size but black... Or double buffer. (drawing everything on a invisible area then copy it all to the screen.
/Mario
Mvh Mario..
Edited by - Dharma on December 13, 2001 8:21:03 PM
/Mario
Mvh Mario..
Edited by - Dharma on December 13, 2001 8:21:03 PM






