@Override
 public void dispose(GLAutoDrawable drawable) {
   final GL3 gl = drawable.getGL().getGL3();
   gl.glDeleteBuffers(2, new int[] {vbo, ibo}, 0);
   gl.glDetachShader(progID, fragID);
   gl.glDetachShader(progID, vertID);
   gl.glDeleteProgram(progID);
   gl.glDeleteShader(fragID);
   gl.glDeleteShader(vertID);
 }
Exemple #2
0
 /**
  * Delete this VBO properly.
  *
  * @param gl The global openGL instance.
  */
 public void delete(GL3 gl) {
   gl.glBindVertexArray(0);
   gl.glDeleteVertexArrays(1, this.vboPointer);
   gl.glDeleteBuffers(1, this.bufferPointer);
 }