Results 1 to 9 of 9

Thread: Wiped.

  1. #1

    Thread Starter
    Lively Member Zero's Avatar
    Join Date
    Feb 2000
    Posts
    101

    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

  2. #2
    Zaei
    Guest
    Nope, there is no way to stop this from happening. DirectX turns AutoRedraw off before starting up, for speed.

    Z.

  3. #3

    Thread Starter
    Lively Member Zero's Avatar
    Join Date
    Feb 2000
    Posts
    101

    ...

    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

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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!

  5. #5

    Thread Starter
    Lively Member Zero's Avatar
    Join Date
    Feb 2000
    Posts
    101

    ...

    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

  6. #6
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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!

  7. #7

    Thread Starter
    Lively Member Zero's Avatar
    Join Date
    Feb 2000
    Posts
    101

    ...

    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

  8. #8
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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!

  9. #9
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242
    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
  •  



Click Here to Expand Forum to Full Width