Archived

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

black_mage_s

Direct 3D and Direct Draw

Recommended Posts

When using both of these at the same time will they conflict with each other? ie. I am making a game where the menu will appear from direct draw ,but you can still see some of the 3d game in the back. there will also be a world map that is 3d, but has been shrunk down to fit in the menu [url]http://www.geocities.com/black_mage_s/Image2.gif[/url] if the image doesnt work you may have to delete the http:// part

Share this post


Link to post
Share on other sites
assuming that you are talking about anything other than DX8, you HAVE to use Direct Draw to make a game with Direct 3D, and in most cases you can use the features of both at the same time.

~Vendayan

Share this post


Link to post
Share on other sites
heehee
sorry, im not exactly a veteran to this.
but before you say, well you should start doing this before you do this and this, i already have a good part of the games engine coded, and it works in flawless 3d, i just wanted to know if i could use a lot of the direct draw elements.

sorry if i sounded defensive, i just heard you guys saying this to a lot of people

Share this post


Link to post
Share on other sites
Assuming you''re talking about using DirectX 7 here (DD7 with D3D7), then there isn''t any problem as such, but you can lose performance and certain types of compositing won''t work:

- Doing *ANY* locks on textures or the swap chain will totally stall and serialise the 3D pipe. Even for a pure 2D app locks will stall things.

- Don''t do ANY 2D drawing operations inside a BeginScene/EndScene pair, this isn''t supported on some hardware and on the hardware it does work on it can be a performance killer.

- Don''t expect to do 3D on top of 2D backgrounds - it won''t work on some graphics hardware.

- If you must do some 2D (e.g. blits), do it after the EndScene, before the Flip. It should be closer to the flip than the EndScene, do as much work as you can after EndScene to give the 3D pipe a chance to process as much as possible before you stall it with 2D.


Generally though, if you have any 3D you''re better off doing all your 2D with 3D - it''s the way hardware has been going over the past few years.

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites