Jump to content
  • Advertisement
Sign in to follow this  

Globally shared data has to be global?

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

I have just encountered a design problem that forces me to use a globally shared data. Be it wrapped in a class or not, it's gonna have to be made globally accessible. Well, here's the deal: The Video accepts some configurations that are set on construction. Such can be double buffering, full screen mode, alpha blending, et caetera. My only issue is with alpha blending, since it's the only configuration that my implementation would have to know about. I am using SDL, so I must know if I have to pass that SDL_SRCALPHA flag to each surface creation and if I have to map RGB or RGBA color values, but I think that last one won't matter much, since alpha would be ignored on blitting. The only idea I came up was to have static members on Video that could give me that information (alpha enabled or not). This seems like a design flaw and I need some help at this point.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!