Archived

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

Guest Anonymous Poster

How do you create a DirectX7 wrapper in C++

Recommended Posts

mason    128
Yep, wrap every function.

You can't "derive" anything from COM, regardless of language, because COM has no support for virtual functions. To get true C++ style objects, make a new class, wrap all the DirectX calls into similarly named functions, then derive / make virtual whatever you want.

Or, be lazy and just expose the interface directly in your base class.

Mason McCuskey
Spin Studios
www.spin-studios.com

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Can it be done without writing a function for every DirectX function, or can you use some COM trick to make it easier?

Share this post


Link to post
Share on other sites