Example #1
0
 protected override unsafe void Release()
 {
     fixed(uint *addr = &_hdc)
     {
         Gl.DeleteTextures(1, addr);
     }
 }
Example #2
0
 public void Dispose()
 {
     if (TextureID != 0)
     {
         Gl.DeleteTextures(1, new uint[] { TextureID });
         TextureID = 0;
     }
 }
Example #3
0
        public void Dispose()
        {
            if (TextureID != 0)
            {
#if MEMORY_LOGGER
                MemoryLogger.DestroyTexture(TextureID, Size);
#endif

                Gl.DeleteTextures(1, new uint[] { TextureID });
                TextureID = 0;
            }
        }
Example #4
0
        protected virtual void Dispose(bool disposing)
        {
            if (TextureID != 0)
            {
#if MEMORY_LOGGER
                MemoryLogger.DestroyTexture(TextureID, Size);
#endif

                Gl.DeleteTextures(1, new uint[] { TextureID });
                TextureID = 0;
            }
        }
Example #5
0
        public void Dispose()
        {
            if (DepthID != 0 || BufferID != 0 || TextureID != null)
            {
                Gl.DeleteTextures(TextureID.Length, TextureID);
                Gl.DeleteFramebuffers(1, new uint[] { BufferID });
                Gl.DeleteRenderbuffers(1, new uint[] { DepthID });

                BufferID  = 0;
                DepthID   = 0;
                TextureID = null;
            }
        }
Example #6
0
        protected virtual void Dispose(bool disposing)
        {
            if (DepthID != 0 || BufferID != 0 || TextureID != null)
            {
                Gl.DeleteTextures(TextureID.Length, TextureID);
                Gl.DeleteFramebuffers(1, new uint[] { BufferID });
                Gl.DeleteFramebuffers(1, new uint[] { DepthID });

                BufferID  = 0;
                DepthID   = 0;
                TextureID = null;
            }
        }
Example #7
0
 /// <summary>
 /// Delete a Texture name.
 /// </summary>
 /// <param name="ctx">
 /// A <see cref="GraphicsContext"/> used for deleting this object name.
 /// </param>
 /// <param name="name">
 /// A <see cref="UInt32"/> that specify the object name to delete.
 /// </param>
 protected override void DeleteName(GraphicsContext ctx, uint name)
 {
     // Delete texture name
     Gl.DeleteTextures(name);
 }
Example #8
0
 /// <summary>
 /// Shortcut for deleting a single texture without created an array to pass to the gl function.
 /// Calls Gl.DeleteTextures(1, id).
 /// </summary>
 /// <param name="texture">The ID of the texture to delete.</param>
 public static void DeleteTexture(uint texture)
 {
     uint1[0] = texture;
     Gl.DeleteTextures(1, uint1);
 }