Results 1 to 4 of 4

Thread: Dx Windowed LAG

  1. #1

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    Dx Windowed LAG

    In windowed mode Dx7...so I am blting to a window's client rect....
    My comp begins to lag like you wouldn't believe. I click close and it takes almost like two minutes to for the app to close...I am serious no bs.

    The line which does this is when I Blt to the Primary, could, by any chance this be due to the fact I am also repainting the background of the window when WM_PAINT is called? does a Dx DD Blt send a WM_PAINT message???

    This is my first attemp at Dx7 Windowed, and I pretty much went by code in the SDK for an app which switched between the modes.

    Any idea's?
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  2. #2
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Foregt about WM_PAINT, has nothing to do with a DX app...

  3. #3

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339
    Then what on earth could be causng the extreme lag.

    In windowed mode its laggy, way to laggy...100% cpu usage.
    In full screen its nothing, not even noticable, no spikes in cpu usage.
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  4. #4

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339
    GetClientRect(m_hwnd, &m_rWindow);
    GetClientRect(m_hwnd, &m_rScreen);
    ClientToScreen(m_hwnd, (POINT*)&m_rScreen.left);
    ClientToScreen(m_hwnd, (POINT*)&m_rScreen.right);

    Changed:
    PHP Code:
     hRet Primary->Blt(&m_rScreenBackBuffer, &m_rWindowDDBLT_WAITNULL);    //Blt the Windowed buffer 
    To:
    PHP Code:
     hRet Primary->Blt(&m_rScreenBackBufferNULLDDBLT_WAITNULL);    //Blt the Windowed buffer 


    No lag...so far. An incredible increase in speed.

    Once again tho, Dx7 in windowed mode when I Blt to the Primary ie. the window does it send a WM_PAINT message?


    Also, should the backbuffers width and hieght be the size of my window or full screen during windowed mode.
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

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