Archived

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

Direct3d? DirectDraw?? HELP!!!

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

Recommended Posts

ok, I used to program alot in C++ for DOS, moved to Win32 about two years ago, now started to migrate from softwares to games. i''m a quick learner, but when i approached Directx 8, (ive Read all SDK & tuturials) well, i wanted to learn use graphics, but the documentation only refers to 3D. ive been searching for a month for how-to use 2D graphics (nothing biggie, lines&bitmaps) for a game, heard things about direct draw, but microsoft says its all INSIDE D3D and rather hide it. now, if youll be kind enough to answer me two questions i''ll be most gratful (actually, you dont know how much cause i''ve been looking for this for 2 monthes now) 1. whats microsoft''s DirectX''s interface part that handles 2D graphics? and i mean in DX8, why isnt there any documentation?? 2. Documentation for Question 1? tuturials? I just need simple things like draw lines,circles and then some bitmaps. i can go on on my self from there. thanks a WHOLE lot to who ever answer this. consider your feets kissed. ok, i went too far, but you catch my meaning Gil

Share on other sites
You should use DirectX 7 (it''s all contained in the DX8 SDK though, so you don''t actually need the DX7 SDK), it contains the DirectDraw component, while DX8 is more geared towards 3D graphics, and all the DirectDraw stuff is "hidden".

Rumor has it that DirectX 9 will yet again contain the DirectDraw stuff, but for now your pretty much stuck with version 7 (unless you want to "emulate" 2D using 3D primitives, you should be able to find some info on this site about that).

Share on other sites
so what youre actually saying that microsoft
decided to "hide" all 2D related interface?

idiotic, but sounds like microsoft
ok...

now, does it mean i should have to migrate
back to dx7 or that i can use the same
directdraw in dx8?

Gil

Share on other sites
I think it is unlikely that MS will reimplement ddraw for dx9, so dont hold your breath.

The reason for getting rid of 2D is simple - there isnt an awful lot of point in it. You can still do 2d using direct3d (textured quads etc) plus you get hardware accelerated scaling, rotation,alpha blending, transparency, lighting etc. for free. In these days of hardware acceleration, 3d is faster than 2d.

There is a cost to this - 3d is a little less intuitive to use and requires a bit more setup. To be honest though, I think the advantages outweigh the disadvantages.

Share on other sites
2D in DirectX 8 is very easy to do. Being a programming newbie, I''m well aware of the level of technical difficulty at which I start getting confused. The scope of the DirectX 8 SDK is a headache at first, but just take the time to learn how everything is organized and labeled, then understanding the rest (at least the logic behind the syntax) is cake. Then you can get into the meat of DirectX Graphics, which is organized and implemented in a logical, if not somewhat overly complicated, fashion.

Ok, 2D in dx8...

Tutorials:
http://www.flipcode.com/tutorials/tut_dx82d.shtml
http://www.mvps.org/directx/articles/blit3d.htm
http://www.mvps.org/directx/articles/blit3d.htm
http://www.mvps.org/directx/articles/blit3d.htm

The tutorial on 2D in DX8 here on Gamedev is the best by far, however. Try it first, it helped me get my feet on the ground.

Share on other sites
quote:
Original post by CrazedGenius
A GeForce2 MX is under $100 and is ALOT MORE than adequate. Spending alot of time to learn an outdated API so that you can save$100 on a card seems like a bad idea. If you total up all the time spent learning, your time should be worth more than $100... Wrong. See i would have gone out and bought a new video card, but there is one thing standing in my way. See my video for my comp is built in, and there is no AGP slot, and i am not going to use a PCI video card. So actually, i don''t have to save$100, i have to save alot more.

Share on other sites
Yes, you do represent a special case, where it is harder to upgrade. However, I urge you to consider the long range:

It may be better to invest the $89.15 for a PCI geForce2 MX and learn DX8 then to save the$90.00 and learn an outdated API. Let''s say your time is worth $5.00 an hour and it takes you 20 hrs to become a DX7 guru (I''m guessing your time is worth more and it would take alot longer to become an expert). You''ve just "spent"$100 to learn outdated stuff that is only becoming less and less appropriate.

On the other hand, if you spend $90.00, you get a better card, plus the opportunity to learn an API with a much better long term value. Alot has changed between DX7 and DX8 and those changes will probably stick for the next couple revisions. Don''t save a couple dollars at the expense of wasting your time... Share this post Link to post Share on other sites quote: Original post by Sandman I think it is unlikely that MS will reimplement ddraw for dx9, so dont hold your breath. The reason for getting rid of 2D is simple - there isnt an awful lot of point in it. You can still do 2d using direct3d (textured quads etc) plus you get hardware accelerated scaling, rotation,alpha blending, transparency, lighting etc. for free. In these days of hardware acceleration, 3d is faster than 2d. There is a cost to this - 3d is a little less intuitive to use and requires a bit more setup. To be honest though, I think the advantages outweigh the disadvantages. G''day! DirectGraphics9 is supposed to have a DirectDraw-like interface on top of D3D to make 2D stuff easier to do. It will likely be an addition fo D3DX or a separate D3DX-like library. You can find similar wrappers all over the place already. If you only care about 2D, using D3DXSprite or one of the many third-party wrappers will give you all the benefits that 3D hardware offer (the alphablending, etc) without worrying about the 3D-isms. Stay Casual, Ken Drunken Hyena Share this post Link to post Share on other sites quote: Original post by helpo Wrong. See i would have gone out and bought a new video card, but there is one thing standing in my way. See my video for my comp is built in, and there is no AGP slot, and i am not going to use a PCI video card. So actually, i don''t have to save$100, i have to save alot more.

G''day!

For who can''t (like you because of insufficent hardware) or won''t use D3D there is still DirectDraw7. There is no DirectDraw8 because there isn''t any need for it, there''s nothing left to add. DirectDraw7 will be available as long as DirectX is, so there is no problem using it if it does all you need.

You can use the other DX8 components (sound, play, etc) with DirectDraw7, the only thing you can''t use with it is D3D8.

Stay Casual,

Ken
Drunken Hyena

Share on other sites
quote:
Original post by Anonymous Poster
Yeah, that''s _indeed_ idiotic. Nothing is more waste than using 3D just for some simple 2D graphics, and it''s way more complex to do too. M$probably thinks that 2D graphics are not anymore used? G''day! Using 3D hardware to do 2D graphics isn''t wasteful at all. With all the benefits (alphablending, scaling, rotation) you get with the hardware support you can do 2D using 3D a lot faster than you could with a plain 2D API. It''s also not much more complex. There are many articles on how to do it. There are a number of wrappers designed to make it easy (including D3DXSprite which is included in the SDK). M$ is well aware that 2D graphics are alive and well. DirectDraw7 is also alive and well and will be for a very long time.

Some days I really wish I had Moderator rights so I could delete Anonymous flame-bait like this. There''s just too much of it.

Stay Casual,

Ken
Drunken Hyena