public void deleteVBOs(final AbstractBufferData<?> buffer) { if (buffer == null) { return; } // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final int id = buffer.getVBOID(context.getGlContextRep()); if (id == 0) { // Not on card... return. return; } buffer.removeVBOID(context.getGlContextRep()); final IntBuffer idBuff = BufferUtils.createIntBuffer(1); idBuff.put(id); idBuff.flip(); ARBBufferObject.glDeleteBuffersARB(idBuff); }
public void deleteVBOs(final AbstractBufferData<?> buffer) { if (buffer == null) { return; } final GL gl = GLContext.getCurrentGL(); // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final int id = buffer.getVBOID(context.getGlContextRep()); if (id == 0) { // Not on card... return. return; } buffer.removeVBOID(context.getGlContextRep()); final IntBuffer idBuff = BufferUtils.createIntBuffer(1); idBuff.put(id); idBuff.flip(); gl.glDeleteBuffers(1, idBuff); }