Archived

This topic is now archived and is closed to further replies.

Qually

Problem with direct draw display

Recommended Posts

I created a tetris clone using direct draw a couple weeks ago, and it worked fine. It consists of a background bitmap layer, then several other layers for active block, blocks that have already fallen, and score. For some reason now though, the background bitmap, which is white, has a black line that goes to a random place in the screen every time the frame is updated. but when i put in a counter to stop updating after X frames, the black line isnt there, and it just displays a freeze frame. Also, when i try to take screen shots, the black line isnt there. I know it is a problem with the background blt because when i only display the background it happens, and when i display everything but the background it doesnt. I am thinking it is a problem with a refresh rate or something because it didnt happen before. does anyone have an idea what is causing this? if this is unclear i can post any part of the code or all of it if anyone wants.

Share this post


Link to post
Share on other sites
make sure you are double buffering and when you flip() it you DONT use the novsync flag. see the sdk for more details. you are correct, its a refresh problem. easily fixed if you double buffer, further refined by flipping to vsync.

Share this post


Link to post
Share on other sites