Jump to content
  • Advertisement
Sign in to follow this  
Skute

D3DX

This topic is 4884 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

Whats the general concensus on using the D3DX stuff? i.e. D3DXCreateFont() and D3DXCreateTextureFromFileEx() etc Are they not really suitable - just there for ease of use - better to use the existing D3D functions, or are they the preferred way of loading fonts and textures? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Some people prefer a custom bitmap font over ID3DXFont. But almost everyone using DirectX uses D3DXCreateTextureFromFile* because it is just so simple and about as fast as you will ever need it to be. The only exception is when loading unsupported image types, which you can usually avoid by simply saving your file as a supported type.

The math library is incredibly useful.

The shader functions and interfaces are also incredibly useful, if not necessary.

D3DX is a wonderful utility library. If there is any reason not to use D3DX, it would be for cross platform support where D3DX is not available.

Share this post


Link to post
Share on other sites
Quote:
Original post by skittleo
If there is any reason not to use D3DX, it would be for cross platform support where D3DX is not available.

Everything skittleo said, and especially the bit quoted above [grin]

You might want to consider D3DX as being (as the name suggests) a natural extension to D3D. Look at the D3D specs whilst ignoring ALL of D3DX and you'll see that whilst it's powerful it's very abstract and doesn't really do anything on it's own without your help.

A perfect example of this would be textures - the IDirect3DTexture9 interface doesn't do much more than represent a block of binary data with a given pixel format, it allows you to modify it (via LockRect()), but it's D3DX that will allow you to write to it using a C/C++ callback and load the raw binary data from numerous file formats.

hth
Jack

Share this post


Link to post
Share on other sites
Hi there Skute,
"D3DX is a library of tools designed to provide additional graphics functionality on top of Microsoft Direct3D. D3DX is provided as a dynamic-link library (DLL)."

This also means that they are there to be used. I would say that they are a fantastic way to prototype engines/games quickly and saves you the trouble of knowing alot of the math involved with doing most of the Matrix methods, such as rotation and translations.

It would be an added benefit if you knew what these methods did behind the scenes and it's always a good idea to play around with creating your own.

These are just my views. I hope you find some value in them.

Share this post


Link to post
Share on other sites
I seriously think that without the D3DX library, I probably would have gone with OpenGL... (not to start a flame war. That's just my feelings.)

Share this post


Link to post
Share on other sites
One other note about the D3DX library is that it's hardware accelerated. It will automatically take advantage of CPU extensions like 3DNow and because of that, anytime I have a program that requires vectors or matrices I always use D3DX instead of writing my own. Even in the Glide programming I've been doing recently, I use D3DX for almost everything.

Share this post


Link to post
Share on other sites
OK cool, clears that up then, was just making sure it wasnt one of those MS extensions that you werent actually "supposed" to use :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!