protected override void OnAttached() { bufferModel = new Sprite2DBufferModel(); bufferModel.Sprites = Sprites; bufferModel.SpriteCount = SpriteCount; if (texture != null) { (RenderCore as Sprite2DRenderCore).UpdateTexture(texture, EffectTechnique.EffectsManager.MaterialTextureManager); } base.OnAttached(); }
protected override void OnAttached() { bufferModel = Collect(new Sprite2DBufferModel()); bufferModel.Sprites = Sprites; bufferModel.SpriteCount = SpriteCount; if (texture != null) { TextureView = Collect(EffectTechnique.EffectsManager.MaterialTextureManager.Register(texture, true)); } base.OnAttached(); }
protected override void OnDetach() { bufferModel = null; TextureView = null; base.OnDetach(); }