Archived

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

Dirge

Statics across projects

Recommended Posts

OK, here''s my problem. I made a resource manager singleton class that can be derived from to make a direct3d or opengl version (in their own DLL projects). So in order to initialize the proper one, you just instatiate their static instance to whatever they are supposed to be (in the cpp file for the derived resource manager). So since a static MUST be implemented, when I include the resourcemanagerinterface.h file in the project I want to use the dll''s with, I must still declare the function that instantiates the singleton. Unfortunatly though, this completely ruins the fact that there can be two implementations. What''s a better way to have it so that depending on which api/dll is being used, a different implementation is instantiated??? (any of this make sense?) Thanks! "Love all, trust a few. Do wrong to none." - Shakespeare Dirge - Aurelio Reis www.CodeFortress.com Current Causes: Nissan sues Nissan

Share this post


Link to post
Share on other sites