Exemplo n.º 1
0
 public void Dispose()
 {
     if (!disposed)
     {
         if (shaderObject != IntPtr.Zero)
         {
             GhostManager.Add(new ShaderRLGhost(shaderObject));
             shaderObject = IntPtr.Zero;
         }
         GC.SuppressFinalize(this);
         disposed = true;
     }
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     if (!disposed)
     {
         if (shaderObject != 0)
         {
             GhostManager.Add(new ShaderGL3Ghost(shaderObject));
             shaderObject = 0;
         }
         GC.SuppressFinalize(this);
         disposed = true;
     }
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     if (!disposed)
     {
         if (bufferObject != UInt32.MaxValue)
         {
             GhostManager.Add(new BufferGhost(bufferObject));
             bufferObject = UInt32.MaxValue;
         }
         GC.SuppressFinalize(this);
         disposed = true;
     }
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     if (!disposed)
     {
         if (textureObject != IntPtr.Zero)
         {
             GhostManager.Add(new TextureRLGhost(textureObject));
             Debug.WriteLine("GhostTexture: " + textureObject.ToString());
             textureObject = IntPtr.Zero;
         }
         GC.SuppressFinalize(this);
         disposed = true;
     }
 }
Exemplo n.º 5
0
 public void Dispose()
 {
     if (!disposed)
     {
         //System.Diagnostics.Debug.WriteLine("DeleteRenderbuffers " + renderBufferObject);
         if (renderBufferObject != 0)
         {
             GhostManager.Add(new RenderBufferGhost(renderBufferObject));
             renderBufferObject = 0;
         }
         GC.SuppressFinalize(this);
         disposed = true;
     }
 }
Exemplo n.º 6
0
        public void Dispose()
        {
            if (!disposed)
            {
                foreach (var shader in shaders)
                {
                    shader.Dispose();
                }
                shaders.Clear();
                if (programObject != System.IntPtr.Zero)
                {
#if DEBUG_PROGRAM
                    Trace.WriteLine("Ghosting program " + Name + " " + programObject);
#endif
                    GhostManager.Add(new ProgramRLGhost(programObject));
                    programObject = System.IntPtr.Zero;
                }
                GC.SuppressFinalize(this);
                disposed = true;
            }
        }
Exemplo n.º 7
0
 public void Dispose()
 {
     if (!disposed)
     {
         foreach (var kvp in textures)
         {
             kvp.Value.Dispose();
         }
         foreach (var kvp in renderbuffers)
         {
             kvp.Value.Dispose();
         }
         if (framebufferObject != IntPtr.Zero)
         {
             GhostManager.Add(new FramebufferRLGhost(framebufferObject));
             framebufferObject = IntPtr.Zero;
         }
         System.GC.SuppressFinalize(this);
         disposed = true;
     }
 }