VideoScream IGraphicsDeviceService

Apr 28, 2009 at 4:48 PM
Hi,

creating my game engine i need implements GraphicsDeviceManager class to support multiwindow, when i try to load a video with this new structure i throw this exception:

Unable to cast object of type 'Orange.Core.Window.OrangeDeviceManager' to type 'Microsoft.Xna.Framework.GraphicsDeviceManager'.

the problem was in VideoStream.cs: line 140

 

GraphicsDeviceManager gdm = (GraphicsDeviceManager)creader.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceManager));

 


i change to

IGraphicsDeviceService gdm = (IGraphicsDeviceService)creader.ContentManager.ServiceProvider.GetService(typeof(IGraphicsDeviceService));

 

recompile the scurvy fixing the exception

this is my suggestion to fix future

Jefferson Soares