🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

A question about performance

Started by
1 comment, last by blazter2 24 years, 5 months ago
I''m making a game that uses a lot of sprites. They will be stored on the system memory, like the back buffer. The question is: Using system memory surfaces, is it better to use directdraw surfaces, and directdraw blitter or use a software implementation, like memcpys and memsets ?
Thanks,blazter
Advertisement
Well, since your backbuffer and surfaces are in system memory, I''d reccomend writing your own Blt functions. It will allow you to do some really nifty things like alpha blending.

Are you sure that you really need to put your surfaces in system memory though? VidMem->VidMem blts are hardware accelerated and thus, very fast. If you don''t have too many surfaces and you don''t need alpha blending then just use DirectDraw''s surfaces and put them in VidMem.

--TheGoop
Personally, I prefer System memory. True nothing beats a hardware blter, but it does not support alpha blending at the very least(or at least on an average card). DDraw does not provide primitives drawing, and you have to rely on either GDI or your own. If you are on your own, writing to Video memory is costly.
Putting all in system memory allows for extensibity in the future.

Suggestion: Have a primary surface, and at least 1 video back buffer, + a system back buffer. Render all to system first, then to video, then flip or blt to primary

This topic is closed to new replies.

Advertisement