|
-
Nov 3rd, 2004, 10:38 AM
#1
Thread Starter
PowerPoster
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
-
Nov 3rd, 2004, 10:52 AM
#2
Foregt about WM_PAINT, has nothing to do with a DX app...
-
Nov 3rd, 2004, 02:52 PM
#3
Thread Starter
PowerPoster
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
-
Nov 3rd, 2004, 03:45 PM
#4
Thread Starter
PowerPoster
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_rScreen, BackBuffer, &m_rWindow, DDBLT_WAIT, NULL); //Blt the Windowed buffer
To:
PHP Code:
hRet = Primary->Blt(&m_rScreen, BackBuffer, NULL, DDBLT_WAIT, NULL); //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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|