Re: bad performance when running SimpleSample in fullscreen
- From: legalize+jeeves@xxxxxxxxxxxxxxxxx (Richard [Microsoft Direct3D MVP])
- Date: Thu, 18 Jan 2007 11:57:03 -0800
[Please do not mail me a copy of your followup]
=?Utf-8?B?U2hvZ3Vu?= <Shogun@xxxxxxxxxxxxxxxxxxxxxxxxx> spake the secret code
<4E8DE2C4-4492-464C-B108-8735D125F88C@xxxxxxxxxxxxx> thusly:
If it renders frames when the app is idle, should the fps then not be higher
than 60? My FPS is exactly 60 according to PIX.
I already explained that you can get a busy CPU wait during Present.
I tried putting a sleep(20) into the the message loop to see if the process
then would yield for other processes, with no luck.
Then I tried to build my own D3D application, with a message loop like this:
while(GetMessage(&msg))
{
TranslateMessage(msg);
DispatchMessage(msg);
}
switch(msg)
{
... case WM_QUIT:
exit();
break;
}
and a windows procedure where i handle WM_PAINT this way:
WM_PAINT:
return DefaultWndProc(msg);
With a mesage loop like this and D3D setup to only render on vsync, i have
the same problems.
That would mean you have 100% CPU usage even when your app isn't doing
anything, which clearly is not possible. So what you describe above
can't be what you did.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Legalize Adulthood! <http://blogs.xmission.com/legalize/>
.
- Follow-Ups:
- References:
- Re: bad performance when running SimpleSample in fullscreen
- From: Richard [Microsoft Direct3D MVP]
- Re: bad performance when running SimpleSample in fullscreen
- From: Shogun
- Re: bad performance when running SimpleSample in fullscreen
- Prev by Date: Re: bad performance when running SimpleSample in fullscreen
- Next by Date: Re: copy texture to another texture
- Previous by thread: Re: bad performance when running SimpleSample in fullscreen
- Next by thread: Re: bad performance when running SimpleSample in fullscreen
- Index(es):
Loading