Subby
Subby

Reputation: 5480

Silverlight XNA - GraphicsDeviceManager

I am making a game in XNA but wish to port it over to Silverlight XNA. In XNA, there is a graphics object at class level which is of type GraphicsDeviceManager. In Silverlight XNA however, there is no such thing. What shall I do in this case? I need it since I am passing over stuff like ViewPort.Width etc etc to some game objects so i know where to place them.

Any help will be highly appreciate.

Upvotes: 0

Views: 152

Answers (1)

Subby
Subby

Reputation: 5480

Ah. I have managed to find out that there is an equivalent in Silverlight XNA. It's called SharedGraphicsDeviceManager. I'm just passing over SharedGraphicsDeviceManager.Current.GraphicsDevice.Viewport to the classes and then applying logic appropriately to the objects position.

Upvotes: 1

Related Questions