Jump to content
  • Advertisement


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


Statics across projects

This topic is 5753 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

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

  • 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!