Example #1
0
        public MaterialManager(GraphicsContext gfx)
        {
            if (gfx == null)
            {
                throw new ArgumentNullException("gfx");
            }

            _deviceManager          = gfx.DeviceManager;
            _textureResourceManager = gfx.TextureResourceManager;
            _textureSamplerManager  = gfx.TextureSamplerManager;
        }
Example #2
0
        public MaterialResource(DeviceManager deviceManager, ITextureResourceManager textureManager, ITextureSamplerManager samplerManager, string id) : base(id)
        {
            if (deviceManager == null)
            {
                throw new ArgumentNullException("deviceManager");
            }
            if (textureManager == null)
            {
                throw new ArgumentNullException("textureManager");
            }
            if (samplerManager == null)
            {
                throw new ArgumentNullException("samplerManager");
            }

            _deviceManager  = deviceManager;
            _textureManager = textureManager;
            _samplerManager = samplerManager;
        }
 public MaterialResource(DeviceManager deviceManager, ITextureResourceManager textureManager, ITextureSamplerManager samplerManager, string id)
     : base(id)
 {
     _deviceManager = deviceManager;
     _textureManager = textureManager;
     _samplerManager = samplerManager;
 }