XNA Creators Club Online
Page 1 of 1 (6 items)
Sort Posts: Previous Next

Redraw a window while it's moving

Last post 25/06/2009 13:27 by zodX. 5 replies.
  • 23/04/2009 9:58

    Redraw a window while it's moving

    Hi.

    my application has two threads. Thread A has the game engine, Thread B the rendering with DX10.
    The main window is created by thread B, and so the message-pump (PeekMessage & Co).

    When the user move this window with the mouse, the rendering is freezed (the thread B seems to be blocked somewhere) while thread A could continue his work.
    Is there any way to prevent this behavior and still have rendering during the move ? (The DirectX samples don't have this features, but some games (World of Warcraft for example) do - so I think there is way to override the default behavior, but how ?)

    Thanks...
  • 23/04/2009 11:09 In reply to

    Re: Redraw a window while it's moving

    The only thought I have is that you could try redrawing the window inside of the Form.OnMove or Form.OnLocationChanged methods. I've never tried it so if it doesn't work, I don't have any other ideas.
  • 24/04/2009 9:12 In reply to

    Re: Redraw a window while it's moving

    Hi.
    Thanks, but I'm using direct Win32 API, not MFC. Any other idea or equivalent ?
  • 24/04/2009 9:37 In reply to

    Re: Redraw a window while it's moving

    Sorry, but I'm not a C++ developer. Maybe someone else will respond.
  • 13/05/2009 11:08 In reply to

    Re: Redraw a window while it's moving

    up ?
  • 25/06/2009 13:27 In reply to

    Re: Redraw a window while it's moving

    Yes, I know what you are meaning.

    its very difficult to get this, ive tried it.
    Sometimes it stopped my drawings, i wondered.

    Ive tried it directly in the message routine with another render() call, so you got two ones.
    But that doubles (theoretical) the rendering for one frame so you have manage it by yourself somehow to get only one render() call per frame.

    That means take the one render_call on move
    the other render call on paint
    and look which of both is more important

    experiment with update_window() for a extra call or something... ( or region or,....)
    Kommt sich aber in die Quere und produziert Mist.

    I got a Super Idea ! Just take Direct2D ! Its shorter to handle the parameters and it has what you mean !!!-> A clear output on movements and resizings !!!
    Direct2D is a wonder !!!!
Page 1 of 1 (6 items) Previous Next