Direct3d? DirectDraw?? HELP!!!

Started by
16 comments, last by Gilzu 22 years, 9 months ago
This topic came up about an article posted on this site about a week ago, so first, you might want to hunt up that thread.

About 2D graphics in DirectX 8: you can do anything that you could do in DirectDraw using the Sprite interface from D3DX: ID3DXSprite. Search the SDK for exact use of it. There isn''t a whole lot of documentation on that interface for some reason, but you should be able to find enough in the SDK and on the net to get you going. Personally, that''s the route I''d go instead of using DirectX7''s DDraw since ID3DXSprite has support for many features that DDraw never did.

---Dan
Advertisement
About the MS plot...

Think about it - if you''re designing a significant revision to an API, and those revisions are going to affect your API for at least a couple of years, then you make your decision based on current and forthcoming hardware. All of that hardware is optimized for 3D, of which 2D is a subset.

No plot, just good sense.

OpenGL never had a 2D API (there were 2D functions, but in most hardware they are VERY slow). In OpenGL, you just do 2D rendering in "3D space". No MS conspiracy there!

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...
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
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.flipcode.com/tutorials/tut_dx8adv2d.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.
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.

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...
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
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
Stay Casual,KenDrunken Hyena
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
Stay Casual,KenDrunken Hyena
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
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement