DeleteBuffer() public static method

[requires: v1.5] Deletes a single buffer object
public static DeleteBuffer ( int id ) : void
id int The buffer object to be deleted
return void
Example #1
0
        protected override void OnUnload()
        {
            GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
            GL.BindVertexArray(0);
            GL.UseProgram(0);

            // Delete all the resources.
            GL.DeleteBuffer(VertexBufferObject);
            GL.DeleteVertexArray(VertexArrayObject);

            GL.DeleteProgram(Shader.Handle);
            base.OnUnload();
        }
Example #2
0
        public static void cleanUp()
        {
            foreach (var item in VAOs)
            {
                deleteVAO(item);
            }
            for (int i = 0; i < VBOs.Count; i++)
            {
                GL.DeleteBuffer(VBOs[i]);
            }
            foreach (var item in textures)
            {
                GL.DeleteTexture(item);
            }

            GL.DeleteTexture(TextureManager.blockTextureAtlasID);
        }