Beispiel #1
0
 public void Discard()
 {
     MemoryUsed = 0;
     if (handle != 0)
     {
         var capturedHandle = handle;
         Application.InvokeOnMainThread(() => {
             GL.DeleteTextures(1, new uint[] { capturedHandle });
             PlatformRenderer.InvalidateTexture(capturedHandle);
         });
         handle = 0;
     }
 }
Beispiel #2
0
 public void Discard()
 {
     MemoryUsed = 0;
     if (framebuffer != 0)
     {
         var h = framebuffer;
         Application.InvokeOnMainThread(() => {
             GL.DeleteFramebuffers(1, new uint[] { h });
             PlatformRenderer.CheckErrors();
         });
         framebuffer = 0;
     }
     if (handle != 0)
     {
         var h = handle;
         Application.InvokeOnMainThread(() => {
             GL.DeleteTextures(1, new uint[] { h });
             PlatformRenderer.CheckErrors();
             PlatformRenderer.InvalidateTexture(h);
         });
         handle = 0;
     }
     DeleteRenderBuffer(ref depthBuffer);
 }