Exemplo n.º 1
0
 protected override void OnUnload()
 {
     shaderProgram.Dispose();
     particleTexture.Dispose();
     rectangleTexture.Dispose();
     ballTexture.Dispose();
     diamondTexture.Dispose();
     arialFont.Dispose(); // both fonts share texture, disposing one disposes both.
     textureBatcher.Dispose();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Occurs after after calling GameWindow.Exit, but before destroying the OpenGL context.
 /// Override to unload application resources.
 /// </summary>
 /// <param name="e">Not used.</param>
 public override void OnUnload(EventArgs e)
 {
     if (m_textHandleHelp != null)
     {
         m_textHandleHelp.Dispose();
     }
     if (m_textHandleStats != null)
     {
         m_textHandleStats.Dispose();
     }
     if (m_textFont != null)
     {
         m_textFont.Dispose();
     }
     if (m_blobs != null)
     {
         m_blobs.Dispose();
     }
 }