public void Dispose()
 {
     checkDestroyListener(true);
     foreach (Viewport vp in viewports)
     {
         ViewportManager.destroyViewport(vp);
     }
     viewports.Clear();
     renderTarget = IntPtr.Zero;
 }
 /// <summary>
 /// This will destroy the passed viewport.
 /// </summary>
 public void destroyViewport(Viewport viewport)
 {
     viewports.Remove(viewport);
     RenderTarget_destroyViewport(renderTarget, ViewportManager.destroyViewport(viewport));
 }