One fullscreen blit in 800x600x32 -> 20 fps :(

Started by
23 comments, last by Astral 23 years, 9 months ago
I may be wrong here (and let me know if I am) but I don''t think that the vid/system mem thing is what''s slowing him down. On an old 4mb ati graphics card and a shitty system I was getting like 60 fps blitting (800x600x32) a background from system memory to video memory. Is there anything special in the code outside of your graphics routine that we should know about?

-BacksideSnap-
Advertisement
Are you using Blt() or BltFast()?
hiya,

BltFast is what i am using and i allready tried disabling ALL
other game functionality. Still i am only getting about 29 fps.
If it wasnt slow on my friends machine too i would guess its a driver issue. Could it be a sdk / lib issue as i am still using the dx7 sdk but i have the dx7A runtime installed ??

cu
Astral
Why it is so slow on all computers is because, you moving douwords at a time meaning more info per pixel, the 2d features of all cards weather it be geforce 2 super caduper ddr or a milenium 220 are optimized to the max theses days hardware guysa re focusing on 3d, that why 1280x1024x32 is so fast because 3d is being always optimized. Your best bet would be to drop down to 16bit it will increase your spead big time.
Hardcore Until The End.
Damn I need a new mouse, keeps double clicking on me

I also forgot, make sure your screen refresh rate is higher then 60 Hz other wise it caps your frame rates. Usually most monitors show the rate when you press the setup button on them, run your app and press the button c what it says if it says 60, then try manualling setting the rate with ddraw!
Hardcore Until The End.
First of all, I think BriarLoDeran is absolutely right that you shouldn''t just blow this off as "well 32bpp is just slow". Also, if the background image is getting put in system memory for some weird reason, I think BacksideSnap is right -- even that wouldn''t cause such a poor framerate.

I have another guess along the lines of the system-memory/video-memory thing: maybe your background image is in video memory and your backbuffer is somehow in system memory. I think blitting from video memory to system memory is really slow (like paddling upstream or something...).

So make sure you''re creating your backbuffer surface before creating your background image surface, for one thing.

Also, I can''t imagine there being a conflict with dx7A run-time and dx7 code.

One more thing: make sure your fps counter is working correctly, because it''s not like you''d be able to see the difference between 28 fps and 280 fps when rendering a static background.
> I think blitting from video memory to system memory is really slow

... yes, so slow that the framerate would drop far below 29 fps It''s definately not the problem.

Astral, what is your system config ? Could you post your call to BltFast here ? Are you *sure* you are providing the correct size of the screen ? AFAIK, if your screen is 800x600 your rectangle should go from 0,0 to 801,601.. if you don''t, DX will stretch your screen, which won''t be noticable for a 1 pixel difference, but will make things far slower.

Y.
>Astral, what is your system config ? Could you post your call >to BltFast here ? Are you *sure* you are providing the correct >size of the screen ? AFAIK, if your screen is 800x600 your >rectangle should go from 0,0 to 801,601.. if you don''t, DX will >stretch your screen, which won''t be noticable for a 1 pixel >difference, but will make things far slower.

(How do you copy a message into your own message?)

Anyway,shouldn''t the rect actually be from 0,0 to 799, 599?

Astral, try to do this. In your blt routine do
HRESULT ddrval

ddrval = BackBuffer->BltFast(bla bla)

if(ddrval!=DD_OK)
{
//Log out some kind of error to a file or to the screen
}

The reason for this is because I noticed when the blt does fail it slows down the FPS considerably. If you find that BltFast is returning an error then you could further investigate to find out the reason.

But then again, I might be completely off, but I think it''s definately worth a try

ByteMe95::~ByteMe95()My S(h)ite
quote:Original post by Ysaneya

AFAIK, if your screen is 800x600 your rectangle should go from 0,0 to 801,601.. if you don''t, DX will stretch your screen, which won''t be noticable for a 1 pixel difference, but will make things far slower.
Y.


Since the poster is using bltfast you couldn''t possibly specify the destination rectangle size,

but for the record, I''ve never heard of this. I think if you have a screen of 800x600, then you make the rectangle 0,0 to 800,600. Don''t add an extra one to it. The SDK examples don''t do anything extra either.
___________________________Freeware development:ruinedsoft.com
Hi

1.Try to use Blt() and not BltFast() ....

Blt() will use hardware accel if available i think bltfast will not

2.Try to have all sufraces in Videomemory not by just that u have more VRAM but by setting VIDEOMEMORY Flag in create sufrace caps structure ... if u get an error... maybe u get smthing in ur caps that makes them in systemmemory

3.What speed is ur PC? because moveing 800x600x32 data over the system PCI data bus is slow...and u will not even get 29fps

4.I think it can be done because i have a RTS game 2D in 800x600x16 with a lots of Alpha FX and shadows and logic and stuff .... it gets as low as 30fps with all FX enabled...so u must be able to do the same...
(hmmm i make it in ASM but i think is no diffrence in DDRAW calls)

5.PS.Take care not to strech sufraces and not to get into half sincronization with VSYNC signal....this last will kill ur framerate to half... (there is an article on this formu about this)

Hope u make it...

Bogdan
obysoft

This topic is closed to new replies.

Advertisement