public ResourceManager(IMaterialFactory materialFactory, IShaderFactory shaderFactory, ITextureFactory textureFactory) { if (materialFactory == null) throw new ArgumentNullException("materialFactory"); if (shaderFactory == null) throw new ArgumentNullException("shaderFactory"); if (textureFactory == null) throw new ArgumentNullException("textureFactory"); _materialFactory = new MaterialFactory(); _shaderFactory = shaderFactory; _textureFactory = textureFactory; }
public UserInterfaceManager(IKernel kernel) { IDeviceProvider provider = kernel.Get<IDeviceProvider>(); provider.RenderForm.Resize += OnRenderFormResize; _device = provider.Device; _textureFactory = kernel.Get<ITextureFactory>(); _renderer = kernel.Get<IUserInterfaceRenderer>(); _elements = new List<Element>(); _projectionDirty = true; }
/// <summary>Default constructor of the base Game class does nothing. Only when Initialize is called /// is anything useful done. /// </summary> public GameEngine( IWindowFactory windowFactory, IRendererFactory rendererFactory, ITextureFactory textureFactory, ISurfaceFactory surfaceFactory, ITrueTypeTextFactory trueTypeTextFactory, IEventManager eventManager, ILogger <GameEngine> logger = null) { WindowFactory = windowFactory ?? throw new ArgumentNullException(nameof(windowFactory)); RendererFactory = rendererFactory ?? throw new ArgumentNullException(nameof(rendererFactory)); TextureFactory = textureFactory ?? throw new ArgumentNullException(nameof(textureFactory)); SurfaceFactory = surfaceFactory ?? throw new ArgumentNullException(nameof(surfaceFactory)); EventManager = eventManager ?? throw new ArgumentNullException(nameof(eventManager)); TrueTypeTextFactory = trueTypeTextFactory ?? throw new ArgumentNullException(nameof(trueTypeTextFactory)); this.logger = logger; EventManager.WindowClosed += OnExiting; EventManager.Quitting += OnExiting; }
protected override void Initialize() { SfxrSynth.AudioPlayerFactory = new Audio.AudioPlayerFactory(); base.Initialize(); engineRef = new EngineReference(); displayTarget = new DisplayTarget(engineRef, Window, graphics); textureFactory = new TextureFactory(this.GraphicsDevice); spriteBatch = new SpriteBatch(GraphicsDevice); inputFactory = new InputFactory(displayTarget); runner = new RunnerWrapper("./Content/MusicDemo.pv8", engineRef, displayTarget, textureFactory, inputFactory); runner.Initialize(); // forces viewport adapter to refresh position/scaling graphics.PreferredBackBufferWidth = graphics.PreferredBackBufferWidth; graphics.PreferredBackBufferHeight = graphics.PreferredBackBufferHeight; graphics.ApplyChanges(); }
public PixelDataExporter(string fileName, int[] pixelData, int width, int height, IColor[] colors, ITextureFactory textureFactory) : base(fileName, textureFactory, colors) { this.pixelData = pixelData; this.width = width; this.height = height; }
public TilemapFlagExporter(string fileName, IEngine engine, ITextureFactory textureFactory) : base(fileName, engine, textureFactory) { }
public TilemapExporter(string fileName, IEngine engine, ITextureFactory textureFactory) : base(fileName, textureFactory) { this.engine = engine; }
public ResourceManager(IMaterialFactory materialFactory, IShaderFactory shaderFactory, ITextureFactory textureFactory) { if (materialFactory == null) { throw new ArgumentNullException("materialFactory"); } if (shaderFactory == null) { throw new ArgumentNullException("shaderFactory"); } if (textureFactory == null) { throw new ArgumentNullException("textureFactory"); } _materialFactory = new MaterialFactory(); _shaderFactory = shaderFactory; _textureFactory = textureFactory; }
public TextureAtlasBuilder(ITextureFactory <TTexture> textureFactory) => this.textureFactory = textureFactory;
public Runner(ITextureFactory textureFactory) { loadService = new LoadService(textureFactory); }
public SceneFactory(IMeshFactory meshFactory, ITextureFactory textureFactory, ILogger <SceneFactory> logger) { this.meshFactory = meshFactory; this.textureFactory = textureFactory; this.logger = logger; }
public TextRenderer(ITextureFactory <TTexture> textureFactory, SpriteBatch <TTexture> spriteBatch) { this.textureFactory = textureFactory; this.spriteBatch = spriteBatch; }
public ImageExporter(string fileName, ITextureFactory textureFactory, IColor[] colors = null) : base(fileName) { this.textureFactory = textureFactory; this.colors = colors; }
internal Style(ITextureFactory textureFactory) { this.textureFactory = textureFactory; }
public OBJToRAMMeshConverter(ITextureFactory _textureFactory) { textureFactory = _textureFactory; }
public LoadService(ITextureFactory textureFactory) { this.textureFactory = textureFactory; // this.colorFactory = colorFactory; }