示例#1
0
 private void DisposeRenderer()
 {
     if (m_rendermgr != null)
     {
         m_rendermgr.Dispose();
         m_rendermgr = null;
     }
     if (m_renderer != null)
     {
         m_renderer.Dispose();
         m_renderer = null;
     }
 }
示例#2
0
        private void TryUpdateRenderer()
        {
            if (m_asset == null)
            {
                return;
            }
            if (m_gl == null)
            {
                return;
            }
            if (m_renderer != null)
            {
                return;
            }

            m_renderer  = new CubismAvaloniaRenderer(m_gl);
            m_rendermgr = new CubismRenderingManager(m_renderer, m_asset);

            // !must be configured so for Avalonia
            m_renderer.UsePremultipliedAlpha = true;
        }