Radegast.Rendering.FaceData.Dispose C# (CSharp) Method

Dispose() public method

Dispose VBOs if we have them in graphics card memory
public Dispose ( ) : void
return void
        public void Dispose()
        {
            //hack
            //            if (VertexVBO != -1) Compat.DeleteBuffer(VertexVBO);
            //            if (IndexVBO != -1) Compat.DeleteBuffer(IndexVBO);
            //            VertexVBO = -1;
            //            IndexVBO = -1;
        }

Usage Example

Beispiel #1
0
 /// <summary>
 /// Remove any GL resource we may still have in use
 /// </summary>
 public override void Dispose()
 {
     if (Faces != null)
     {
         foreach (Face f in Faces)
         {
             if (f.UserData != null && f.UserData is FaceData)
             {
                 FaceData data = (FaceData)f.UserData;
                 data.Dispose();
                 data = null;
             }
         }
         Faces = null;
     }
     base.Dispose();
 }