|
-
Apr 1st, 2002, 03:29 PM
#1
Thread Starter
Lively Member
Wiped.
No, I'm not done bothering you yet.
My windowed DX7 app has a bit of a problem: Every time another window passes overhead the image on the form gets wiped out, or at the very least wiped out where the other window touched it. I have Autoredraw on the form set to true, but to no avail. Is there a way to keep this from happening, short of refreshing the window 60 times a second?
~Zero the Inestimable
-
Apr 1st, 2002, 05:02 PM
#2
Nope, there is no way to stop this from happening. DirectX turns AutoRedraw off before starting up, for speed.
Z.
-
Apr 1st, 2002, 08:00 PM
#3
Thread Starter
Lively Member
...
Hmm. This is bad.
I just tried doing it with BlittoDC. Hoo boy. The whole redraw operation at 1600x1200 takes 540 msec. With DirectX, it takes 12. This, kids, is the advantage of DirectX.
So if disabling picture wipe is impossible, perhaps I can fire a redraw when the display is clipped? I can't think of a way to do this off the top of my head. Suggestions are welcome, if anyone has an idea...
Maybe I'll just refresh every half second and live with it. If the picture is wiped it won't stay wiped for long.
~Zero the Inestimable
-
Apr 2nd, 2002, 05:22 AM
#4
Frenzied Member
well can't you put in some code for refreshing to whole picture again in the form_paint event? (maybe it would call itself again so you would need to block that)
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 2nd, 2002, 09:07 AM
#5
Thread Starter
Lively Member
...
Doesn't seem to do the trick.
I've cut my redraw time down to an average of 5 ms (\/\/00T!) and thus I have a timer that just repaints every 1/4 of a second. Seems to do the trick.
While you're actually working with the application this isn't a problem at all, but if you start dragging stuff over it things get ugly. Now, things stay ugly for a split second and then un-ugly themselves automatically. You really don't notice it unless you look for it, now.
~Zero the Inestimable
-
Apr 2nd, 2002, 01:45 PM
#6
Frenzied Member
hm sorry that I could not help out
but one more thing: if you are using a loop kill the timer. if not I guess even the Evil[tm] timer will do it.
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 2nd, 2002, 05:12 PM
#7
Thread Starter
Lively Member
...
No loops. This isn't a game, so I can get away with passive refreshing. That's what I'm after, here, anyway. At this point it's mostly-passive refreshing, since it always refreshes four times a second anyway...
~Zero the Inestimable
-
Apr 2nd, 2002, 08:12 PM
#8
Frenzied Member
yeah I am still wondering why the paint event does not work?
isn't it triggered or where is the problem with it?
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 2nd, 2002, 08:22 PM
#9
Addicted Member
Maybe the paint event isn't raised by just switching between two open windows. You may want to put code into the GotFocus event. That way when you get the focus back after losing it you can redraw your screen at the correct time.
There's my 2 cents worth.
Drewski
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|