You sure can link C to C++. But when you introduce pure (or not) virtual interfaces, then vtables get used.
Plus, an application that supports multiple renderers (d3d/ogl) will probably call LoadLibrary on d3d9.dll.
That could actually raise a concern under linux. Luckily again for us though, the vtable won't ever change on the C++ objects, as the API has already been decided upon (and somewhat abandoned).
Originally Posted by mdias
Looking through some WINE headers reveals that the COM way of doing this is actually exactly the same as your example. That is to say, expose functions as virtual.
EDIT: On windows though, MS will always provide you with both OpenGL32.dll and d3d[something].dll (which is probably the latest version out anyway), so most developers probably don't care about runtime loading.
Last edited by zhasha; 01-26-2010 at 01:01 AM.