Archived

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

computer_guy

D3DX helper classes

Recommended Posts

No it doesn''t make you a bad programmer. If you are not happy with what they do you can always change them later. No need to reinvent the wheel for smaller tasks. I would personally not use all of them though, especially not the d3dxsprite class, that is really slow.



____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites
I used to hate using the D3DX helper class because it hid away a lot of the actual math and code behind what was actually going on. After I learned what various D3DX functions actually did, I coded them myself in my own style, optimized them and then ran tests on them compared to the D3DX functions. As an example, I was able to call my very own custom-made matrix multiplication function over 65,000 times a second. But, I was able to call the D3DX matrix multiplication function over 2,000,000 times a second...

So, I decided to use the D3DX functions (for the very obvious reason) .

Seriously though, it does depend on what section you want to use. I suggest using the math functions because they are optimized for many processors making them max out on any speed advantage available. If you are using .x files in your game, I suggest using the .x files stuff because they are pretty hard to parse manually. On the other hand, like the previous poster mentioned, avoid the D3DXFont interface because it uses the GDI to draw it''s fonts and is very slow for that reason. I wrote my own Font engine, it didn''t take very long to put in most of the functionality I needed, and it runs very well.

Anyway, my suggestion is to know what''s going behind the scenes, but don''t avoid using D3DX unless it doesn''t provide you the features you need, or unless you can code it better and cleaner.

Hope this helps!

Share this post


Link to post
Share on other sites
Thanks for the help everyone. The reason I thought I shouldn''t use them is because I thought it wasn''t pro. But then again most big game companies don''t write their own game engines they use ones such as the Unreal engine. And I''ve only really started Direct3d the other day. I just wasn''t sure what to start with.

Share this post


Link to post
Share on other sites