Sign in to follow this  

Wraping D3DXVECTOR4 etc

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

I starting creating my 3D engine in DirectX9 and I was thinking I should wrap D3DXVECTOR and the similar classes. This will allow me to easly adapt to interface changes in D3DX or DirectX9/10. Also, it will allow me to add smoothly some extra features needed for these objects. Is that a good idea? How do you handle your direct3D? Thanks in advance.

Share this post


Link to post
Share on other sites
If you intend to target multiple APIs (E.g. DX9 and D3D10), you'll need to wrap any D3D9 specific objects. I haven't looked at D3D10 yet, but I'll be surprised if the vector and matrix classes differ much.

In my project, I wrap the D3DX objects in a very thin wrapper, that lets me add additional functions to the classes, and most functions should compile away to their direct D3DX equivalents.

If you're going to target multiple APIs, you'll want to make your app as modular as possible, probably be providing a bunch of interfaces that'll do some behind the scenes work then pass straight through to D3D.

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this