Jump to content
  • Advertisement
Sign in to follow this  
The C modest god

Wraping D3DXVECTOR4 etc

This topic is 4289 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!