I am trying to define texture2d objects as shared. The reason of why I am trying to do is, I made an xna user control and my project loads unlimited (as much as the user wants) my XNA User Control. And all of the textures are same. I don't want to load textures for everyone of them (think how much ram size it will use if I do it)
The real problem is:
cmMaps = New ContentManager(Services, "Maps")
As you see, ContentManager news ServiceProvider for initialization. When I look at the codes where Services variant modified, I see this lines:
GraphicsDeviceService = GraphicsDeviceService.AddRef(Handle, ClientSize.Width, ClientSize.Height)
Why I can't define global Texture2D objects. Why is it specific for the window or control that the XNA tries to draw on?
Is it possible to define em as shared variant and able to use it in every XNA UserControl?
Note: I took UserControl source codes from this page: http://xbox.create.msdn.com/en-US/education/catalog/sample/winforms_series_1