public RenderTargetManager(IPluginHost host, IIOFactory iofactory) { this.host = host; this.iofactory = iofactory; ConfigAttribute cattr = new ConfigAttribute("Texture Input Mode"); cattr.IsSingle = true; cattr.DefaultEnumEntry = "Manual"; pinmode = this.iofactory.CreateIOContainer<IDiffSpread<eRenderFormatMode>>(cattr); pinmode.IOObject.Changed += Pinmode_Changed; this.currentmode = eRenderFormatMode.Manual; this.CreateFormat(); this.CreateSize(); }
public RenderTargetManager(IPluginHost host, IIOFactory iofactory) { this.host = host; this.iofactory = iofactory; ConfigAttribute cattr = new ConfigAttribute("Texture Input Mode"); cattr.IsSingle = true; cattr.DefaultEnumEntry = "Manual"; pinmode = this.iofactory.CreateIOContainer <IDiffSpread <eRenderFormatMode> >(cattr); pinmode.IOObject.Changed += Pinmode_Changed; this.currentmode = eRenderFormatMode.Manual; this.CreateFormat(); this.CreateSize(); }
private void Pinmode_Changed(IDiffSpread <eRenderFormatMode> spread) { if (this.currentmode == eRenderFormatMode.Manual) { this.DisposeTexIn(); } this.currentmode = spread[0]; if (this.currentmode == eRenderFormatMode.Inherit) { this.CreateTextureIn(); } if (this.currentmode == eRenderFormatMode.InheritSize) { this.CreateTextureIn(); } }
private void Pinmode_Changed(IDiffSpread<eRenderFormatMode> spread) { if (this.currentmode == eRenderFormatMode.Manual) { this.DisposeTexIn(); } this.currentmode = spread[0]; if (this.currentmode == eRenderFormatMode.Inherit) { this.CreateTextureIn(); } if (this.currentmode == eRenderFormatMode.InheritSize) { this.CreateTextureIn(); } }