Sign in to follow this  

Do the pros use D3DX

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

Why wouldn't the pro's use D3DX? I'll bet they're smart enough to know NOT to re-invent the wheel unless they need something from a D3DX function that currently isn't available.

I suppose the same idea applies to STL (in C++) - why reinvent a linked list if std::list already does what you want.

Jack

Share this post


Link to post
Share on other sites
yes the pros use directX. all the command & conquer games use it, for instance. i'm sure there are a bizillion others. actually, AFAIK directx is the majority of the market share with openGL in the 2nd place spot. the id engines are the only big ones i know of that use openGL.

-me

Share this post


Link to post
Share on other sites
Quote:
Original post by PaulCesar
D3DX is optimized for generic use, you could of course optimize further by making assumptions based on your engine of course.


Unless you are as experienced with pure ASM as the Intel programmers are, I seriously doubt that this is true. The math D3DX functions have been extensivly optimized by Intel, Microsoft, and the IHV's. This includes all the matrix, quaternion, and vector operations.

As far as "what do the pro's use", it varies. Usually, it depends on the platform(s) they are developing for. If a developer house is making an engine for PC and XBOX, then they probably use some of D3DX, such as the math functions and file loading functions (such as D3DXCreateTextureFromFile).

However, if they develop for non-Microsoft platforms, such as PS2 and Gamecube, the engine has to be as portable as possible. This probably means not using D3DX at all.

Share this post


Link to post
Share on other sites
Whooever thinks Doom3 (John Carmack) is OpenGL is a god damn idiot.

D3DX are some extensions to the CORE library of DirectX, like Glut is to OpenGL.

D3DX may involve many bugs in some highly sensible functions, like convert to INDEXED blended mesh, some sprite functions and so on.

D3DX serves the purpose, that it uses core DirectX functions (as if you could do the same) and summarises the most common.

For example, if you would like to create a box or a sphere, you would have to create a vertex buffer and fill it. That what D3DX does for you. So they think many people would like to have a BOX or SPHERE on the fly and so there is just one function that does it for you.

D3DXMESH for example, is a set of VERTEX BUFFERS. It just helps you to load a mesh from file. But how the function is written, nobody knows, and if they forgot a bug inthere, you can not fix it, unless you recreate the whole function, which you do not have the source for. That is the problem, why the "PROS" do not use D3DX. You can not tell if it works correct. If DirectX changes, it is not neccessary that D3DX will change too, since it will inherit all functions from DirectX like any other program would.

Share this post


Link to post
Share on other sites
Quote:
Original post by Samurai Jack
Whooever thinks Doom3 (John Carmack) is OpenGL is a god damn idiot.

D3DX are some extensions to the CORE library of DirectX, like Glut is to OpenGL.

D3DX may involve many bugs in some highly sensible functions, like convert to INDEXED blended mesh, some sprite functions and so on.

D3DX serves the purpose, that it uses core DirectX functions (as if you could do the same) and summarises the most common.

For example, if you would like to create a box or a sphere, you would have to create a vertex buffer and fill it. That what D3DX does for you. So they think many people would like to have a BOX or SPHERE on the fly and so there is just one function that does it for you.

D3DXMESH for example, is a set of VERTEX BUFFERS. It just helps you to load a mesh from file. But how the function is written, nobody knows, and if they forgot a bug inthere, you can not fix it, unless you recreate the whole function, which you do not have the source for. That is the problem, why the "PROS" do not use D3DX. You can not tell if it works correct. If DirectX changes, it is not neccessary that D3DX will change too, since it will inherit all functions from DirectX like any other program would.


???

I don't understand why anyone would thing D3DX is bug-ridden. It was written (and rewritten) by highly trained Pros employed by Microsoft, Intel, and various other experts. It is designed to take out alot of the grunt work in doing it yourself, while also making the functions even faster. If you prefer to write 1000s of lines of code that D3DX lets you do in 3, AND have that code run slower than using the library, go ahead. If there is a bug in D3DX, I would hope that MS would have gotten rid of it by now. Despite what everyone says, MS isn't THAT bad.

Share this post


Link to post
Share on other sites
Yes, I can tell you for a fact that many pros use D3DX but they selectively choose which parts to use. It's not an all-or-nothing proposition.

For instance they may have their own skinning code. Or they may want to pack all their static geometry into large vertex buffers, which means D3DX Meshes are out. But they might still use D3DXMATRIX and D3DXVECTOR, which are very handy, and as has been mentioned the texture loading functions are great when you're using DDS files.

Share this post


Link to post
Share on other sites
Quote:
Original post by Samurai Jack
Whooever thinks Doom3 (John Carmack) is OpenGL is a god damn idiot.


Oh?

Quote:

D3DX may involve many bugs in some highly sensible functions, like convert to INDEXED blended mesh, some sprite functions and so on.


Or it may be tested and tried over several releases and already done for you. Anyone who thinks they can write a 'more bug-free' version of any library is asking to be proven wrong.

Quote:

For example, if you would like to create a box or a sphere, you would have to create a vertex buffer and fill it. That what D3DX does for you. So they think many people would like to have a BOX or SPHERE on the fly and so there is just one function that does it for you.


Most of D3DX is far more useful than creating boxes and spheres. The HLSL compiler is a D3DX component, for one.

Quote:

D3DXMESH for example, is a set of VERTEX BUFFERS. It just helps you to load a mesh from file. But how the function is written, nobody knows, and if they forgot a bug inthere, you can not fix it, unless you recreate the whole function, which you do not have the source for. That is the problem, why the "PROS" do not use D3DX. You can not tell if it works correct. If DirectX changes, it is not neccessary that D3DX will change too, since it will inherit all functions from DirectX like any other program would.


So game developers don't use libraries because there might be bugs? That's a little misguided. I suppose we could all go back to writing our own video drivers. You know, in case ATI's has a bug.

D3DX uses the Direct3D runtime for some things like VB/IB creation in meshes, but comes as a static library. Changes to Direct3D don't affect it, since it always uses the same version of the runtime--even if 9.0c is installed, if the game was built with 9.0b, it will continue to use 9.0b behavior. MS is very good at the whole backwards-compatibility thing, and is aware of such issues.

Professional houses do use some components of D3DX such as the math libraray and HLSL compiler (Valve). Some probably use the mesh things on the tools side to help optimize meshes. A lot of them use the Effects framework in-engine (NCSoft).

Share this post


Link to post
Share on other sites
We certainly use D3DX but, as Donovan stated, selectively, mostly for math and textures, no mesh stuff. Many of the math functions are not only optimized, but take advantage of CPU-specifics like SSE, SSE2, etc. The file loading is a little slow so we use some of own for speed. D3DX is good, use it, don't waste time reinventing code that MS have spent alot of time getting right. Study the D3DX docs, you will learn alot.

joe
image space

Share this post


Link to post
Share on other sites
Quote:
Original post by Samurai Jack
Whooever thinks Doom3 (John Carmack) is OpenGL is a god damn idiot.


Doom3's render for the PC is written using OpenGL.
Yes, other parts of DirectX are used (input certainly, sound probably) but D3D its self isnt used.
D3D will be used on the XBox port, but ID arent writing it, some other company is.

I now return you to your advertsied thread...

Share this post


Link to post
Share on other sites
Yeah we use D3DX, again selectively , none of D3DXMesh stuff, its a bit to constaining, but certainly all the maths functions, as has been previously mentioned they're nicely optimised, and we certainly don't have the spare time to try and recreate that level of optimisation.

If ain't broke don't fix it. Use as much as you can, without limiting what your trying to do.

just my 2p worth

Share this post


Link to post
Share on other sites
Quote:
Original post by ace_lovegrove
is it not possible to refine the performance of D3DX functions more by rewriting them?
Well pay me many hours and I'll try it out [wink]

Seriously, those guys get paid for optimizing. And circlesoft is right, if it's platform-independent, you won't like D3DX, and any DirectX API.

Quote:
what is d3dx, a wrapper class for d3d?

D3DX is a math & helper library for Direct3D. You can see Direct3D as 'renderer' like OpenGL, and D3DX is the part you have to write yourself when using OpenGL. (matrices, vertices, planes, etc.)

Share this post


Link to post
Share on other sites

This topic is 4851 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.

Guest
This topic is now closed to further replies.
Sign in to follow this