예제 #1
0
        public override void Dispose()
        {
            m_Texture.Dispose();

            if (m_VB != null)
            {
                m_VB.Dispose();
                m_VB = null;
            }
            if (m_Children.Count > 0)
            {
                Object3D obj;
                for (int i = 0; i < m_Children.Count; i++)
                {
                    obj = (Object3D)m_Children.GetByIndex(i);
                    obj.Dispose();
                }
            }
        }
 public void Dispose()
 {
     for (int i = 0; i < m_xSize; i++)
     {
         for (int j = 0; j < m_ySize; j++)
         {
             if (m_Quads[i, j] != null)
             {
                 m_Quads[i, j].Dispose();
             }
         }
     }
     if (m_Texture != null)
     {
         m_Texture.Dispose();
     }
     if (m_VB != null)
     {
         m_VB.Dispose();
     }
 }
예제 #3
0
 /// <summary>
 /// Dispose of the surface when we are done with it to free up video card memory
 /// </summary>
 public void Dispose()
 {
     m_image.Dispose();
 }