is Direct3D faster than DirectDraw?

Started by
3 comments, last by stevenmarky 23 years, 10 months ago
I''ve had a problem where I wanted to create a translucent panel in one of my DirectDraw games, at first at didn''t know how to do this so I found out how to (mix the background 50% with the foreground or take it away), but unfortunatly like everyone said - it runs slow. Why is this? Direct3D can do things like this in full 3D and still be faster - how? Because of this I am thinking of using Direct3D in my definaltly 2D program. Is this a good idea? DX++ The DirectX Programming Site
Advertisement
Alpha Blending is not supported in hardware by DirectDraw. That''s why your routine is slow. The only way to go is to use Direct3D Immediate Mode to use Alpha Blending in hardware, if your video board supports it (most do today).

There is a nice tutorial on 2D Alpha Blending with Direct3D on the following site. Read it and try.

PG
Sorry, forgot to give the URL

http://www.mr-gamemaker.co.uk/
Hell yeah D3D is much faster for alpha, as long as your hardware supports it. Even then software mode supports what is calles stippled or screendoor alpha. It''s a matter of looks but both are faster that using DDraw.

Creativity -- Concept -- Code

Your game is nothing if you don't have all three.

Creativity -- Concept -- CodeYour game is nothing if you don't have all three.http://www.wam.umd.edu/~dlg/terc.htm
Hey if you aren''t using it all the time there''s a tutorial on AlphaBlending with C++ using inline assembly w/ MMX. He had timings of 3 point some odd ms for a 320x200 alpha blit (Not sure on what machine) and a 50/50 blit is even faster. I''ve got 60fps doing a fullscreen 640x480 16bpp 50/50 alpha blend on a PIII 533mhz machine w/ a Voodoo3 3000(Not using the cards features, using ddraw and software).

Just if you want a simpler answer than using D3D, although from what I can tell D3D *is* the way to go, if you think you can do it. I am only using DDraw though...
- Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949

This topic is closed to new replies.

Advertisement