tags:

views:

307

answers:

2

I have a class that derives from XNA's GraphicsDevice, and i want to use it in my game. However, i can't quite figure out what i'm supposed to do to make this new graphics device replace the old one. Any suggestions?

A: 

Check out the winforms sample to show how to manually create a graphics device and what settings you need to set: http://creators.xna.com/en-us/sample/winforms_series1

Joel Martinez
Um, i dont think that helps. i want to know how i might go about creating an extended game class that replaces the graphics device with my extended one. Thanks anyway though
RCIX
+1  A: 

It looks like you can subclass the GraphicsDeviceManager class, which would give you access to the GraphicsDeviceManager's GraphicsDevice class, which is publicly get-only. Here's an example MSDN article about subclassing the GraphicsDeviceManager class:

http://msdn.microsoft.com/en-us/library/bb195022.aspx

jasonh
Hmm that might help. I'll do some more research. Thanks!
RCIX