Stange slowdown, please help

Started by
2 comments, last by Jimmy Valavanis 16 years, 9 months ago
Hi, I've made a DirectDraw application that uses DirectX 7.0. After some speed tests I've noticed then following results: WIDTH HEIGHT FPS 900 600 35 900 700 32 1000 750 28 1000 768 27 1010 768 26 1016 768 26 1020 768 26 1024 768 10 <- Strange slowdown 1040 768 25 1100 800 22 1200 1000 19 1280 1024 7 <- Strange slowdown When I use 1024x768 display mode (both fullscreen and non fullscreen) the performance drops dramatically. I don't use Direct3D, only DirectDraw. I draw the screen using the following instruction rect.Left = 0; rect.Top = 0; rect.Right = WIDTH; rect.Bottom = HEIGHT; if (g_pDDSPrimary->BltFast(0, 0, g_pDDScreen, &rect, DDBLTFAST_WAIT) == DDERR_SURFACELOST) g_pDDSPrimary->Restore; I've changed to IDirectDraw4 interfaces and the problem remained. Initially I though that was a problem with my graphics adapter, but I've tested to 3 different machines with same results: P4 3GHz, GF6600 256MB AMD 2600+, GF7600 256MB AMD 3000+, ATI X700, 128MB (laptop) Any ideas?
Advertisement
Well, I should mention that new video cards really aren't optimized to use DirectDraw anymore, so your slowdowns will probably have something to do with this. Otherwise, there really isn't any particular reason this should be happening. DirectDraw just doesn't offer much in the means of performance anymore.
My guess would be that the slow resolutions are typical screen resolutions while the others are arbitrary surface sizes. Maybe the API expects these resolutions to be able to go fullscreen, thus forcing it to choose suboptimal backbuffer formats and converting the pixel data on each blit. Just an idea, though, don't take my word for it. Maybe you can regain the speed by some flags that you pass upon device creation. In DX9 the documentation notes that a lockable back buffer might cause slowdowns, for example. Look out for similar flags in DX7.

Bye, Thomas
----------
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.
At 1024x768 and at 1280x1024 display resolutions the problems exists both in fullscreen and non fullscreen mode.

This topic is closed to new replies.

Advertisement