Advertisement

Fill something in!

Started by April 23, 2002 06:09 PM
24 comments, last by Wachar 22 years, 8 months ago
Blinking? Maybe it''s tearing.

Instead of drawing it each frame, draw it when the WM_PAINT message is called.

I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
The code is in my other post "FPS". When I use a fps while statement, it doesn''t "blink". But, when I don''t, it does!

----------
Take it to the Xtreme!
----------
Wachar's Eternity <-<-<-<-<- Me own site!
Advertisement
Then the problem is probably tearing. Have you moved your drawing code over to be draw when WM_PAINT is received?

I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
Uh...what?!

----------
Take it to the Xtreme!
----------
Wachar's Eternity <-<-<-<-<- Me own site!
The reason your drawing is tearing is because you are drawing it a lot more than it needs to be.

The WM_PAINT message is sent when a window NEEDS to be redrawn (which is quite a bit less than how often your code draws the polygon). If you draw the shape only when you HAVE to then you are less likely to be getting the tearing affect.

So, only draw the shape when the window receives the WM_PAINT message.

I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
Oh, thanks!

----------
Take it to the Xtreme!
----------
Wachar's Eternity <-<-<-<-<- Me own site!

This topic is closed to new replies.

Advertisement