protected override void OnUnload(EventArgs e) { GL.BindBuffer(BufferTarget.ArrayBuffer, 0); GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0); GL.BindVertexArray(0); GL.DeleteBuffers(mVBO_IDs.Length, mVBO_IDs); GL.DeleteVertexArray(mVAO_ID); mShader.Delete(); base.OnUnload(e); }
protected override void OnUnload(EventArgs e) { base.OnUnload(e); GL.DeleteBuffers(2, mTriangleVertexBufferObjectIDArray); GL.DeleteBuffers(2, mSquareVertexBufferObjectIDArray); GL.BindVertexArray(0); GL.DeleteVertexArrays(2, mVertexArrayObjectIDs); GL.UseProgram(0); mShader.Delete(); }
protected override void OnUnload(EventArgs e) { //Deletes active buffer GL.BindVertexArray(0); //Deletes Buffer objects GL.DeleteBuffers(mVBO.Length, mVBO); GL.DeleteBuffers(mVAO.Length, mVAO); //Attaches shaders mShader.Delete(); //Texture Delete Top_Portal.Delete(); Bottom_Portal.Delete(); BrickWall.Delete(); GL.UseProgram(0); base.OnUnload(e); }