How do you create a DirectX7 wrapper in C++
October 06, 1999 04:00 PM
Can it be done without writing a function for every DirectX function, or can you use some COM trick to make it easier?
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
Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement