if (vertBuf == null || vertBuf.capacity() < (4 * bufferLength)) {
if (vertBuf == null || vertBuf.capacity() < (bufferLength)) {
    public void updateVertexBuffer() {      if (vertex == null) { return; }      int bufferLength;      if (vertQuantity >= 0)        bufferLength = vertQuantity * 3;      else        bufferLength = vertex.length * 3;      if (vertBuf == null || vertBuf.capacity() < (4 * bufferLength)) {        vertBuf = ByteBuffer.allocateDirect(4 * bufferLength).order(            ByteOrder.nativeOrder()).asFloatBuffer();      }      vertBuf.clear();      Vector3f tempVect;      for (int i = 0, endPoint = bufferLength / 3; i < endPoint; i++) {        tempVect = vertex[i];        if (tempVect != null) {          vertBuf.put(tempVect.x).put(tempVect.y).put(tempVect.z);        }      }      vertBuf.flip();    }