Archived

This topic is now archived and is closed to further replies.

is Direct3D faster than DirectDraw?

This topic is 6364 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Sorry, forgot to give the URL

http://www.mr-gamemaker.co.uk/

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites