public GFXManager(INativeGraphicsLoader gfxLoader, GraphicsDevice dev) { if(gfxLoader == null) throw new ArgumentNullException("gfxLoader"); if (dev == null) throw new ArgumentNullException("dev"); _gfxLoader = gfxLoader; _device = dev; }
public GFXManager(INativeGraphicsLoader gfxLoader, GraphicsDevice dev) { if(gfxLoader == null) throw new ArgumentNullException("gfxLoader"); if (dev == null) throw new ArgumentNullException("dev"); _cache = new Dictionary<LibraryGraphicPair, Texture2D>(); _gfxLoader = gfxLoader; _device = dev; }
public NativeGraphicsManager(INativeGraphicsLoader gfxLoader, IGraphicsDeviceProvider graphicsDeviceProvider) { _cache = new Dictionary <LibraryGraphicPair, Texture2D>(); _gfxLoader = gfxLoader; _graphicsDeviceProvider = graphicsDeviceProvider; }
public void SetUp() { _modules = Mock.Of <IPEFileCollection>(); _nativeGraphicsLoader = new NativeGraphicsLoader(_modules); }
private bool InitializeGFXManager() { try { #if MONO _gfxLoader = new GFXLoader(); #else _gfxLoader = new EOCLI.GFXLoaderCLI(); #endif GFXManager = new GFXManager(_gfxLoader, GraphicsDevice); } catch (LibraryLoadException lle) { MessageBox.Show( string.Format( "There was an error loading GFX{0:000}.EGF : {1}. Place all .GFX files in .\\gfx\\. The error message is:\n\n\"{2}\"", (int)lle.WhichGFX, lle.WhichGFX, lle.Message), "GFX Load Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Exit(); return false; } catch (ArgumentNullException ex) { MessageBox.Show("Error initializing GFXManager: " + ex.Message, "Error"); Exit(); return false; } return true; }